function SectionStorageManagerInterface::findByContext
Same name in other branches
- 9 core/modules/layout_builder/src/SectionStorage/SectionStorageManagerInterface.php \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext()
- 10 core/modules/layout_builder/src/SectionStorage/SectionStorageManagerInterface.php \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext()
- 11.x core/modules/layout_builder/src/SectionStorage/SectionStorageManagerInterface.php \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext()
Finds the section storage to load based on available contexts.
Parameters
\Drupal\Component\Plugin\Context\ContextInterface[] $contexts: The contexts which should be used to determine which storage to return.
\Drupal\Core\Cache\RefinableCacheableDependencyInterface $cacheability: Refinable cacheability object, which will be populated based on the cacheability of each section storage candidate. After calling this method this parameter will reflect the cacheability information used to determine the correct section storage. This must be associated with any output that uses the result of this method.
Return value
\Drupal\layout_builder\SectionStorageInterface|null The section storage if one matched all contexts, or NULL otherwise.
See also
\Drupal\Core\Cache\RefinableCacheableDependencyInterface
1 method overrides SectionStorageManagerInterface::findByContext()
- SectionStorageManager::findByContext in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php - Finds the section storage to load based on available contexts.
File
-
core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManagerInterface.php, line 43
Class
- SectionStorageManagerInterface
- Provides the interface for a plugin manager of section storage types.
Namespace
Drupal\layout_builder\SectionStorageCode
public function findByContext(array $contexts, RefinableCacheableDependencyInterface $cacheability);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.