function menu_local_tabs

Same name in other branches
  1. 7.x includes/menu.inc \menu_local_tabs()

Returns a renderable element for the primary and secondary tabs.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use local_tasks_block block or inline theming instead.

See also

https://www.drupal.org/node/2874695

Related topics

1 call to menu_local_tabs()
MenuLegacyTest::testLocalTabs in core/tests/Drupal/KernelTests/Core/Menu/MenuLegacyTest.php
Tests deprecation of the menu_local_tabs() function.

File

core/includes/menu.inc, line 159

Code

function menu_local_tabs() {
    @trigger_error(__FUNCTION__ . '() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use local_tasks_block block or inline theming instead. See https://www.drupal.org/node/2874695', E_USER_DEPRECATED);
    $build = [
        '#theme' => 'menu_local_tasks',
        '#primary' => menu_primary_local_tasks(),
        '#secondary' => menu_secondary_local_tasks(),
    ];
    return !empty($build['#primary']) || !empty($build['#secondary']) ? $build : [];
}

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