function LocalTaskManager::processDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::processDefinition()
  2. 8.9.x core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::processDefinition()
  3. 10 core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::processDefinition()

Overrides DefaultPluginManager::processDefinition

File

core/lib/Drupal/Core/Menu/LocalTaskManager.php, line 159

Class

LocalTaskManager
Provides the default local task manager using YML as primary definition.

Namespace

Drupal\Core\Menu

Code

public function processDefinition(&$definition, $plugin_id) {
    parent::processDefinition($definition, $plugin_id);
    // If there is no route name, this is a broken definition.
    if (empty($definition['route_name'])) {
        throw new PluginException(sprintf('Plugin (%s) definition must include "route_name"', $plugin_id));
    }
}

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