You are here

function yamlform_local_tasks_alter in YAML Form 8

Implements hook_local_tasks_alter().

File

./yamlform.module, line 103
Enables the creation of forms and questionnaires.

Code

function yamlform_local_tasks_alter(&$local_tasks) {
  if (isset($local_tasks['config_translation.local_tasks:entity.yamlform.config_translation_overview'])) {

    // Change 'Translate' base route from 'entity.yamlform.edit_form'
    // to 'entity.yamlform.canonical' because by default config entities don't
    // have canonical views but the form entity does.
    $local_tasks['config_translation.local_tasks:entity.yamlform.config_translation_overview']['title'] = 'Translate';
    $local_tasks['config_translation.local_tasks:entity.yamlform.config_translation_overview']['base_route'] = 'entity.yamlform.canonical';
  }
}