3 namespace Drupal\advanced_help\Plugin\Derivative;
5 use Drupal\Component\Plugin\Derivative\DeriverBase;
8 * Defines dynamic local tasks.
10 class DynamicLocalTasks extends DeriverBase {
15 public function getDerivativeDefinitions($base_plugin_definition) {
17 if (\Drupal::moduleHandler()->moduleExists('help')) {
18 $this->derivatives['advanced_help.help'] = $base_plugin_definition;
19 $this->derivatives['advanced_help.help']['title'] = "Help";
20 $this->derivatives['advanced_help.help']['route_name'] = 'help.main';
21 $this->derivatives['advanced_help.help']['base_route'] = 'help.main';
23 $this->derivatives['help.main'] = $base_plugin_definition;
24 $this->derivatives['help.main']['title'] = "Advanced Help";
25 $this->derivatives['help.main']['route_name'] = 'advanced_help.main';
26 $this->derivatives['help.main']['base_route'] = 'help.main';
28 return $this->derivatives;