class SectionStorage in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Annotation/SectionStorage.php \Drupal\layout_builder\Annotation\SectionStorage
Defines a Section Storage type annotation object.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\layout_builder\Annotation\SectionStorage
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
1 |
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |
SectionStorage:: |
public | property | Any required context definitions, optional. | |
SectionStorage:: |
public | property | Indicates that this section storage handles its own permission checking. | |
SectionStorage:: |
public | property | The plugin ID. | |
SectionStorage:: |
public | property | The plugin weight, optional (defaults to 0). | |
SectionStorage:: |
public | function |
Gets the value of an annotation. Overrides Plugin:: |