public function LayoutBuilderLocalTaskDeriver::getDerivativeDefinitions in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php \Drupal\layout_builder\Plugin\Derivative\LayoutBuilderLocalTaskDeriver::getDerivativeDefinitions()
- 10 core/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php \Drupal\layout_builder\Plugin\Derivative\LayoutBuilderLocalTaskDeriver::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- core/
modules/ layout_builder/ src/ Plugin/ Derivative/ LayoutBuilderLocalTaskDeriver.php, line 65
Class
- LayoutBuilderLocalTaskDeriver
- Provides local task definitions for the layout builder user interface.
Namespace
Drupal\layout_builder\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->sectionStorageManager
->getDefinitions() as $plugin_id => $definition) {
$section_storage = $this->sectionStorageManager
->loadEmpty($plugin_id);
if ($section_storage instanceof SectionStorageLocalTaskProviderInterface) {
$this->derivatives += $section_storage
->buildLocalTasks($base_plugin_definition);
}
}
return $this->derivatives;
}