You are here

public function LayoutBuilderEntityViewDisplay::enableLayoutBuilder in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::enableLayoutBuilder()
  2. 9 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::enableLayoutBuilder()

Enables the Layout Builder.

Return value

$this

Overrides LayoutBuilderEnabledInterface::enableLayoutBuilder

1 call to LayoutBuilderEntityViewDisplay::enableLayoutBuilder()
LayoutBuilderEntityViewDisplay::setOverridable in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Sets the display to allow or disallow overrides.

File

core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php, line 85

Class

LayoutBuilderEntityViewDisplay
Provides an entity view display entity that has a layout.

Namespace

Drupal\layout_builder\Entity

Code

public function enableLayoutBuilder() {
  $this
    ->setThirdPartySetting('layout_builder', 'enabled', TRUE);
  return $this;
}