function TaxonomyHooks::localTasksAlter

Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/src/Hook/TaxonomyHooks.php \Drupal\taxonomy\Hook\TaxonomyHooks::localTasksAlter()

Implements hook_local_tasks_alter().

@todo Evaluate removing as part of https://www.drupal.org/node/2358923.

Attributes

#[Hook('local_tasks_alter')]

File

core/modules/taxonomy/src/Hook/TaxonomyHooks.php, line 83

Class

TaxonomyHooks
Hook implementations for taxonomy.

Namespace

Drupal\taxonomy\Hook

Code

public function localTasksAlter(&$local_tasks) : void {
  $local_task_key = 'config_translation.local_tasks:entity.taxonomy_vocabulary.config_translation_overview';
  if (isset($local_tasks[$local_task_key])) {
    // The config_translation module expects the base route to be
    // entity.taxonomy_vocabulary.edit_form like it is for other configuration
    // entities. Taxonomy uses the overview_form as the base route.
    $local_tasks[$local_task_key]['base_route'] = 'entity.taxonomy_vocabulary.overview_form';
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.