function FieldLayoutEntityDisplayTrait::ensureLayout
Same name in other branches
- 9 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::ensureLayout()
- 8.9.x core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::ensureLayout()
- 11.x core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::ensureLayout()
1 call to FieldLayoutEntityDisplayTrait::ensureLayout()
- FieldLayoutEntityDisplayTrait::init in core/
modules/ field_layout/ src/ Entity/ FieldLayoutEntityDisplayTrait.php - Overrides \Drupal\Core\Entity\EntityDisplayBase::init().
File
-
core/
modules/ field_layout/ src/ Entity/ FieldLayoutEntityDisplayTrait.php, line 128
Class
- FieldLayoutEntityDisplayTrait
- Provides shared code for entity displays.
Namespace
Drupal\field_layout\EntityCode
public function ensureLayout($default_layout_id = 'layout_onecol') {
if (!$this->getLayoutId()) {
$this->setLayoutId($default_layout_id);
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.