function ThemeLocalTask::getDerivativeDefinitions
Same name in this branch
- 10 core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\block\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
Same name in other branches
- 9 core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\system\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
- 9 core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\block\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
- 8.9.x core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\system\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
- 8.9.x core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\block\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
- 11.x core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\system\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
- 11.x core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php \Drupal\block\Plugin\Derivative\ThemeLocalTask::getDerivativeDefinitions()
Overrides DeriverBase::getDerivativeDefinitions
File
-
core/
modules/ system/ src/ Plugin/ Derivative/ ThemeLocalTask.php, line 44
Class
- ThemeLocalTask
- Provides dynamic tabs based on active themes.
Namespace
Drupal\system\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->themeHandler
->listInfo() as $theme_name => $theme) {
if ($this->themeHandler
->hasUi($theme_name)) {
$this->derivatives[$theme_name] = $base_plugin_definition;
$this->derivatives[$theme_name]['title'] = $theme->info['name'];
$this->derivatives[$theme_name]['route_parameters'] = [
'theme' => $theme_name,
];
}
}
return $this->derivatives;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.