function FieldLayoutEntityDisplayTrait::preSave
Same name in other branches
- 8.9.x core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::preSave()
- 10 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::preSave()
- 11.x core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::preSave()
Overrides \Drupal\Core\Entity\EntityDisplayBase::preSave().
File
-
core/
modules/ field_layout/ src/ Entity/ FieldLayoutEntityDisplayTrait.php, line 113
Class
- FieldLayoutEntityDisplayTrait
- Provides shared code for entity displays.
Namespace
Drupal\field_layout\EntityCode
public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage);
// Ensure the plugin configuration is updated. Once layouts are no longer
// stored as third party settings, this will be handled by the code in
// \Drupal\Core\Config\Entity\ConfigEntityBase::preSave() that handles
// \Drupal\Core\Entity\EntityWithPluginCollectionInterface.
if ($this->getLayoutId()) {
$this->setLayout($this->getLayout());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.