You are here

protected function LayoutBuilderCompatibilityTestBase::installLayoutBuilder in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase::installLayoutBuilder()
  2. 9 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase::installLayoutBuilder()

Installs the Layout Builder.

Also configures and reloads the entity display.

File

core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php, line 90

Class

LayoutBuilderCompatibilityTestBase
Tests Layout Builder's compatibility with existing systems.

Namespace

Drupal\Tests\layout_builder\Kernel

Code

protected function installLayoutBuilder() {
  $this->container
    ->get('module_installer')
    ->install([
    'layout_builder',
  ]);
  $this
    ->refreshServices();
  $this->display = $this
    ->reloadEntity($this->display);
  $this->display
    ->enableLayoutBuilder()
    ->save();
  $this->entity = $this
    ->reloadEntity($this->entity);
}