if (!isset($this->content[$name]) && !isset($this->hidden[$name])) {
// Extra fields are visible by default unless they explicitly say so.
if (!isset($definition['visible']) || $definition['visible'] == TRUE) {
- $this->content[$name] = [
- 'weight' => $definition['weight']
- ];
+ $this->setComponent($name, [
+ 'weight' => $definition['weight'],
+ ]);
}
else {
- $this->hidden[$name] = TRUE;
+ $this->removeComponent($name);
}
}
// Ensure extra fields have a 'region'.