You are here

public function LayoutBuilder::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/Element/LayoutBuilder.php \Drupal\layout_builder\Element\LayoutBuilder::__construct()

Constructs a new LayoutBuilder.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository: The layout tempstore repository.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

Overrides PluginBase::__construct

File

core/modules/layout_builder/src/Element/LayoutBuilder.php, line 61

Class

LayoutBuilder
Defines a render element for building the Layout Builder UI.

Namespace

Drupal\layout_builder\Element

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, LayoutTempstoreRepositoryInterface $layout_tempstore_repository, MessengerInterface $messenger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->layoutTempstoreRepository = $layout_tempstore_repository;
  $this->messenger = $messenger;
}