public function DynamicLocalTasks::getDerivativeDefinitions in Advanced Help 8
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
- src/
Plugin/ Derivative/ DynamicLocalTasks.php, line 15
Class
- DynamicLocalTasks
- Defines dynamic local tasks.
Namespace
Drupal\advanced_help\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
if (\Drupal::moduleHandler()
->moduleExists('help')) {
$this->derivatives['advanced_help.help'] = $base_plugin_definition;
$this->derivatives['advanced_help.help']['title'] = "Help";
$this->derivatives['advanced_help.help']['route_name'] = 'help.main';
$this->derivatives['advanced_help.help']['base_route'] = 'help.main';
$this->derivatives['help.main'] = $base_plugin_definition;
$this->derivatives['help.main']['title'] = "Advanced Help";
$this->derivatives['help.main']['route_name'] = 'advanced_help.main';
$this->derivatives['help.main']['base_route'] = 'help.main';
return $this->derivatives;
}
}