W3cubDocs

/Drupal 8

public function LocalTaskManager::processDefinition

public LocalTaskManager::processDefinition(&$definition, $plugin_id)

Performs extra processing on plugin definitions.

By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.

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));
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!LocalTaskManager.php/function/LocalTaskManager::processDefinition/8.1.x