}
if (!empty($options['region']) && $options['region'] === 'hidden') {
- $this->hidden[$name] = TRUE;
+ $this->removeComponent($name);
}
elseif ($options) {
$options += ['region' => $default_region];
- $this->content[$name] = $this->pluginManager->prepareConfiguration($definition->getType(), $options);
+ $this->setComponent($name, $options);
}
// Note: (base) fields that do not specify display options are not
// tracked in the display at all, in order to avoid cluttering the
/**
* {@inheritdoc}
*/
- public function preSave(EntityStorageInterface $storage, $update = TRUE) {
+ public function preSave(EntityStorageInterface $storage) {
// Ensure that a region is set on each component.
foreach ($this->getComponents() as $name => $component) {
$this->handleHiddenType($name, $component);
ksort($this->content);
ksort($this->hidden);
- parent::preSave($storage, $update);
+ parent::preSave($storage);
}
/**