public function LayoutBuilderEntityViewDisplay::setOverridable in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::setOverridable()
Sets the display to allow or disallow overrides.
Parameters
bool $overridable: TRUE if the display should allow overrides, FALSE otherwise.
Return value
$this
Overrides LayoutEntityDisplayInterface::setOverridable
1 call to LayoutBuilderEntityViewDisplay::setOverridable()
- LayoutBuilderEntityViewDisplay::disableLayoutBuilder in core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplay.php - Disables the Layout Builder.
File
- core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplay.php, line 62
Class
- LayoutBuilderEntityViewDisplay
- Provides an entity view display entity that has a layout.
Namespace
Drupal\layout_builder\EntityCode
public function setOverridable($overridable = TRUE) {
$this
->setThirdPartySetting('layout_builder', 'allow_custom', $overridable);
// Enable Layout Builder if it's not already enabled and overriding.
if ($overridable && !$this
->isLayoutBuilderEnabled()) {
$this
->enableLayoutBuilder();
}
return $this;
}