menu_local_tasks($level = 0)
Collects the local tasks (tabs) for the current route.
int $level: The level of tasks you ask for. Primary tasks are 0, secondary are 1.
array An array containing
function menu_local_tasks($level = 0) { /** @var \Drupal\Core\Menu\LocalTaskManagerInterface $manager */ $manager = \Drupal::service('plugin.manager.menu.local_task'); return $manager->getLocalTasks(\Drupal::routeMatch()->getRouteName(), $level); }
© 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!includes!menu.inc/function/menu_local_tasks/8.1.x