8.5.x menu.inc menu_local_tabs()
8.0.x menu.inc menu_local_tabs()
8.1.x menu.inc menu_local_tabs()
8.2.x menu.inc menu_local_tabs()
8.3.x menu.inc menu_local_tabs()
8.4.x menu.inc menu_local_tabs()
8.6.x menu.inc menu_local_tabs()
7.x menu.inc menu_local_tabs()

Returns a renderable element for the primary and secondary tabs.

Related topics

File

core/includes/menu.inc, line 150
API for the Drupal menu system.

Code

function menu_local_tabs() {
  $build = [
    '#theme' => 'menu_local_tasks',
    '#primary' => menu_primary_local_tasks(),
    '#secondary' => menu_secondary_local_tasks(),
  ];
  return !empty($build['#primary']) || !empty($build['#secondary']) ? $build : [];
}