function SectionStorageInterface::deriveContextsFromRoute
Same name in other branches
- 9 core/modules/layout_builder/src/SectionStorageInterface.php \Drupal\layout_builder\SectionStorageInterface::deriveContextsFromRoute()
- 8.9.x core/modules/layout_builder/src/SectionStorageInterface.php \Drupal\layout_builder\SectionStorageInterface::deriveContextsFromRoute()
- 10 core/modules/layout_builder/src/SectionStorageInterface.php \Drupal\layout_builder\SectionStorageInterface::deriveContextsFromRoute()
Derives the available plugin contexts from route values.
This should only be called during section storage instantiation, specifically for use by the routing system. For all non-routing usages, use \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextValue().
Parameters
mixed $value: The raw value.
mixed $definition: The parameter definition provided in the route options.
string $name: The name of the parameter.
array $defaults: The route defaults array.
Return value
\Drupal\Core\Plugin\Context\ContextInterface[] The available plugin contexts.
See also
\Drupal\Core\ParamConverter\ParamConverterInterface::convert()
5 methods override SectionStorageInterface::deriveContextsFromRoute()
- DefaultsSectionStorage::deriveContextsFromRoute in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ DefaultsSectionStorage.php - Derives the available plugin contexts from route values.
- NavigationSectionStorage::deriveContextsFromRoute in core/
modules/ navigation/ src/ Plugin/ SectionStorage/ NavigationSectionStorage.php - Derives the available plugin contexts from route values.
- OverridesSectionStorage::deriveContextsFromRoute in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php - Derives the available plugin contexts from route values.
- SimpleConfigSectionStorage::deriveContextsFromRoute in core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ SimpleConfigSectionStorage.php - Derives the available plugin contexts from route values.
- TestStateBasedSectionStorage::deriveContextsFromRoute in core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ TestStateBasedSectionStorage.php - Derives the available plugin contexts from route values.
File
-
core/
modules/ layout_builder/ src/ SectionStorageInterface.php, line 90
Class
- SectionStorageInterface
- Defines an interface for Section Storage type plugins.
Namespace
Drupal\layout_builderCode
public function deriveContextsFromRoute($value, $definition, $name, array $defaults);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.