class SectionStorage
Same name in other branches
- 8.9.x core/modules/layout_builder/src/Annotation/SectionStorage.php \Drupal\layout_builder\Annotation\SectionStorage
- 10 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
- 10 core/modules/layout_builder/src/Attribute/SectionStorage.php \Drupal\layout_builder\Attribute\SectionStorage
- 11.x core/modules/layout_builder/src/Attribute/SectionStorage.php \Drupal\layout_builder\Attribute\SectionStorage
Defines a Section Storage type annotation object.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
- class \Drupal\layout_builder\Annotation\SectionStorage extends \Drupal\Component\Annotation\Plugin
Expanded class hierarchy of SectionStorage
See also
\Drupal\layout_builder\SectionStorage\SectionStorageManager
Related topics
1 file declares its use of SectionStorage
- SectionStorageManager.php in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php
2 classes are annotated with SectionStorage
- SimpleConfigSectionStorage in core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ SimpleConfigSectionStorage.php - Provides section storage utilizing simple config.
- TestStateBasedSectionStorage in core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ TestStateBasedSectionStorage.php - Provides a test section storage that is controlled by state.
File
-
core/
modules/ layout_builder/ src/ Annotation/ SectionStorage.php, line 16
Namespace
Drupal\layout_builder\AnnotationView source
class SectionStorage extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The plugin weight, optional (defaults to 0).
*
* 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.
*
* @var int
*/
public $weight = 0;
/**
* Any required context definitions, optional.
*
* 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.
*
* @var array
*
* @see \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext()
*/
public $context_definitions = [];
/**
* 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. Defaults to FALSE.
*
* @var bool
*
* @see \Drupal\layout_builder\Access\LayoutBuilderAccessCheck
*/
public $handles_permission_check = FALSE;
/**
* {@inheritdoc}
*/
public function get() {
return new SectionStorageDefinition($this->definition);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Plugin::$definition | protected | property | The plugin definition read from the class annotation. | 1 | |
Plugin::getClass | public | function | Gets the class of the annotated class. | Overrides AnnotationInterface::getClass | 1 |
Plugin::getId | public | function | Gets the unique ID for this annotated class. | Overrides AnnotationInterface::getId | |
Plugin::getProvider | public | function | Gets the name of the provider of the annotated class. | Overrides AnnotationInterface::getProvider | 1 |
Plugin::parse | protected | function | Parses an annotation into its definition. | ||
Plugin::setClass | public | function | Sets the class of the annotated class. | Overrides AnnotationInterface::setClass | 1 |
Plugin::setProvider | public | function | Sets the name of the provider of the annotated class. | Overrides AnnotationInterface::setProvider | |
Plugin::__construct | public | function | Constructs a Plugin object. | 3 | |
SectionStorage::$context_definitions | public | property | Any required context definitions, optional. | ||
SectionStorage::$handles_permission_check | public | property | Indicates that this section storage handles its own permission checking. | ||
SectionStorage::$id | public | property | The plugin ID. | ||
SectionStorage::$weight | public | property | The plugin weight, optional (defaults to 0). | ||
SectionStorage::get | public | function | Gets the value of an annotation. | Overrides Plugin::get |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.