public function TestStateBasedSectionStorage::extractIdFromRoute in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\TestStateBasedSectionStorage::extractIdFromRoute()
- 10 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\TestStateBasedSectionStorage::extractIdFromRoute()
Configures the plugin based on route values.
@internal This should only be called during section storage instantiation.
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
string|null The section storage ID if it could be extracted, NULL otherwise.
Overrides SectionStorageInterface::extractIdFromRoute
Deprecated
in drupal:8.7.0 and is removed from drupal:9.0.0. \Drupal\layout_builder\SectionStorageInterface::deriveContextsFromRoute() should be used instead. See https://www.drupal.org/node/3016262.
File
- core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ TestStateBasedSectionStorage.php, line 81
Class
- TestStateBasedSectionStorage
- Provides a test section storage that is controlled by state.
Namespace
Drupal\layout_builder_test\Plugin\SectionStorageCode
public function extractIdFromRoute($value, $definition, $name, array $defaults) {
}