/**
* Overrides \Drupal\Core\Entity\EntityDisplayBase::preSave().
*/
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());
} } /**
* {@inheritdoc}
*/
public function ensureLayout($default_layout_id = 'layout_onecol'
) { if (!
$this->
getLayoutId()) { $this->
setLayoutId($default_layout_id);
}