function SectionStorage::__construct

Same name in other branches
  1. 10 core/modules/layout_builder/src/Attribute/SectionStorage.php \Drupal\layout_builder\Attribute\SectionStorage::__construct()

Constructs a SectionStorage attribute.

Parameters

string $id: The plugin ID.

int $weight: (optional) The plugin weight. When an entity with layout is rendered, section storage plugins are checked, in order of their weight, to determine which one should be used to render the layout.

\Drupal\Component\Plugin\Context\ContextDefinitionInterface[] $context_definitions: (optional) Any required context definitions. When an entity with layout is rendered, all section storage plugins which match a particular set of contexts are checked, in order of their weight, to determine which plugin should be used to render the layout. @see \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext()

bool $handles_permission_check: (optional) Indicates that this section storage handles its own permission checking. If FALSE, the 'configure any layout' permission will be required during routing access. If TRUE, Layout Builder will not enforce any access restrictions for the storage, so the section storage's implementation of access() must perform the access checking itself.

string|null $deriver: (optional) The deriver class.

Overrides Plugin::__construct

File

core/modules/layout_builder/src/Attribute/SectionStorage.php, line 44

Class

SectionStorage
Defines a SectionStorage attribute.

Namespace

Drupal\layout_builder\Attribute

Code

public function __construct(string $id, int $weight = 0, array $context_definitions = [], bool $handles_permission_check = FALSE, ?string $deriver = NULL) {
}

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