public function LocalTaskManagerInterface::getLocalTasks

public LocalTaskManagerInterface::getLocalTasks($route_name, $level = 0)

Collects the local tasks (tabs) for the current route.

Parameters

string $route_name: The route for which to make renderable local tasks.

int $level: The level of tasks you ask for. Primary tasks are 0, secondary are 1.

Return value

array An array containing

  • tabs: Local tasks render array for the requested level.
  • route_name: The route name for the current page used to collect the local tasks.

See also

hook_menu_local_tasks_alter()

File

core/lib/Drupal/Core/Menu/LocalTaskManagerInterface.php, line 71

Class

LocalTaskManagerInterface
Manages discovery and instantiation of menu local task plugins.

Namespace

Drupal\Core\Menu

Code

public function getLocalTasks($route_name, $level = 0);

© 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!LocalTaskManagerInterface.php/function/LocalTaskManagerInterface::getLocalTasks/8.1.x