class SectionStorage
Same name in this branch
- 10 core/modules/layout_builder/src/Annotation/SectionStorage.php \Drupal\layout_builder\Annotation\SectionStorage
Same name in other branches
- 9 core/modules/layout_builder/src/Annotation/SectionStorage.php \Drupal\layout_builder\Annotation\SectionStorage
- 8.9.x core/modules/layout_builder/src/Annotation/SectionStorage.php \Drupal\layout_builder\Annotation\SectionStorage
- 11.x core/modules/layout_builder/src/Annotation/SectionStorage.php \Drupal\layout_builder\Annotation\SectionStorage
- 11.x core/modules/layout_builder/src/Attribute/SectionStorage.php \Drupal\layout_builder\Attribute\SectionStorage
Defines a SectionStorage attribute.
Plugin Namespace: Plugin\SectionStorage
Hierarchy
- class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
- class \Drupal\layout_builder\Attribute\SectionStorage extends \Drupal\Component\Plugin\Attribute\Plugin
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
Expanded class hierarchy of SectionStorage
See also
\Drupal\layout_builder\SectionStorage\SectionStorageManager
6 files declare their use of SectionStorage
- DefaultsSectionStorage.php in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ DefaultsSectionStorage.php - NavigationSectionStorage.php in core/
modules/ navigation/ src/ Plugin/ SectionStorage/ NavigationSectionStorage.php - OverridesSectionStorage.php in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php - SectionStorageManager.php in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php - SimpleConfigSectionStorage.php in core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ SimpleConfigSectionStorage.php
File
-
core/
modules/ layout_builder/ src/ Attribute/ SectionStorage.php, line 16
Namespace
Drupal\layout_builder\AttributeView source
class SectionStorage extends Plugin {
/**
* Constructs a SectionStorage attribute.
*
* @param string $id
* The plugin ID.
* @param 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.
* @param \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()
* @param 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.
* @param string|null $deriver
* (optional) The deriver class.
*/
public function __construct(string $id, int $weight = 0, array $context_definitions = [], bool $handles_permission_check = FALSE, ?string $deriver = NULL) {
}
/**
* {@inheritdoc}
*/
public function get() : SectionStorageDefinition {
return new SectionStorageDefinition([
'id' => $this->id,
'class' => $this->class,
'weight' => $this->weight,
'context_definitions' => $this->context_definitions,
'handles_permission_check' => $this->handles_permission_check,
]);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AttributeBase::$class | protected | property | The class used for this attribute class. | ||
AttributeBase::$provider | protected | property | The provider of the attribute class. | ||
AttributeBase::getClass | public | function | Gets the class of the attribute class. | Overrides AttributeInterface::getClass | 1 |
AttributeBase::getId | public | function | Gets the unique ID for this attribute class. | Overrides AttributeInterface::getId | |
AttributeBase::getProvider | public | function | Gets the name of the provider of the attribute class. | Overrides AttributeInterface::getProvider | |
AttributeBase::setClass | public | function | Sets the class of the attributed class. | Overrides AttributeInterface::setClass | 1 |
AttributeBase::setProvider | public | function | Sets the name of the provider of the attribute class. | Overrides AttributeInterface::setProvider | |
SectionStorage::get | public | function | Gets the value of an attribute. | Overrides AttributeBase::get | |
SectionStorage::__construct | public | function | Constructs a SectionStorage attribute. | Overrides Plugin::__construct |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.