class DynamicLocalTasks in Advanced Help 8
Defines dynamic local tasks.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\advanced_help\Plugin\Derivative\DynamicLocalTasks
Expanded class hierarchy of DynamicLocalTasks
1 string reference to 'DynamicLocalTasks'
File
- src/
Plugin/ Derivative/ DynamicLocalTasks.php, line 10
Namespace
Drupal\advanced_help\Plugin\DerivativeView source
class DynamicLocalTasks extends DeriverBase {
/**
* {@inheritdoc}
*/
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;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
DynamicLocalTasks:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |