function FieldLayoutEntityDisplayTrait::calculateDependencies
Same name in other branches
- 9 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::calculateDependencies()
- 8.9.x core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::calculateDependencies()
- 11.x core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::calculateDependencies()
Overrides \Drupal\Core\Entity\EntityDisplayBase::calculateDependencies().
Ensure the plugin dependencies are included. Once layouts are no longer stored as third party settings, this will be handled by the code in \Drupal\Core\Config\Entity\ConfigEntityBase::calculateDependencies() that handles \Drupal\Core\Entity\EntityWithPluginCollectionInterface.
File
-
core/
modules/ field_layout/ src/ Entity/ FieldLayoutEntityDisplayTrait.php, line 144
Class
- FieldLayoutEntityDisplayTrait
- Provides shared code for entity displays.
Namespace
Drupal\field_layout\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
// This can be called during uninstallation, so check for a valid ID first.
if ($this->getLayoutId()) {
$this->calculatePluginDependencies($this->getLayout());
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.