class SectionStorage
Same name and namespace in other branches
- 11.x core/modules/layout_builder/src/Attribute/SectionStorage.php \Drupal\layout_builder\Attribute\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
- 10 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
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.