Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NavigationRenderer.php

function NavigationRenderer::hasLocalTasks

Do we have local tasks that we want to show in the top bar?

Return value

bool TRUE if there are local tasks available for the top bar, FALSE otherwise.

1 call to NavigationRenderer::hasLocalTasks()
NavigationRenderer::removeLocalTasks in core/modules/navigation/src/NavigationRenderer.php
Alter the build of any local_tasks_block plugin block.

File

core/modules/navigation/src/NavigationRenderer.php, line 312

Class

NavigationRenderer
Handle rendering for different pieces of the navigation.

Namespace

Drupal\navigation

Code

public function hasLocalTasks() : bool {
    $local_tasks = $this->getLocalTasks();
    return !empty($local_tasks['tasks']);
}
RSS feed
Powered by Drupal