function LayoutBuilderController::layout

Same name in other branches
  1. 9 core/modules/layout_builder/src/Controller/LayoutBuilderController.php \Drupal\layout_builder\Controller\LayoutBuilderController::layout()
  2. 8.9.x core/modules/layout_builder/src/Controller/LayoutBuilderController.php \Drupal\layout_builder\Controller\LayoutBuilderController::layout()
  3. 10 core/modules/layout_builder/src/Controller/LayoutBuilderController.php \Drupal\layout_builder\Controller\LayoutBuilderController::layout()

Renders the Layout UI.

Parameters

\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.

Return value

array A render array.

File

core/modules/layout_builder/src/Controller/LayoutBuilderController.php, line 42

Class

LayoutBuilderController
Defines a controller to provide the Layout Builder admin UI.

Namespace

Drupal\layout_builder\Controller

Code

public function layout(SectionStorageInterface $section_storage) {
    return [
        '#type' => 'layout_builder',
        '#section_storage' => $section_storage,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.