function SectionStorageInterface::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.

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.

4 methods override SectionStorageInterface::extractIdFromRoute()
DefaultsSectionStorage::extractIdFromRoute in core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php
Configures the plugin based on route values.
OverridesSectionStorage::extractIdFromRoute in core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php
Configures the plugin based on route values.
SimpleConfigSectionStorage::extractIdFromRoute in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
Configures the plugin based on route values.
TestStateBasedSectionStorage::extractIdFromRoute in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php
Configures the plugin based on route values.

File

core/modules/layout_builder/src/SectionStorageInterface.php, line 112

Class

SectionStorageInterface
Defines an interface for Section Storage type plugins.

Namespace

Drupal\layout_builder

Code

public function extractIdFromRoute($value, $definition, $name, array $defaults);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.