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.

2 calls to NavigationRenderer::hasLocalTasks()
NavigationRenderer::buildTopBar in core/modules/navigation/src/NavigationRenderer.php
Build the top bar for content entity pages.
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 287

Class

NavigationRenderer
Handle rendering for different pieces of the navigation.

Namespace

Drupal\navigation

Code

private function hasLocalTasks() : bool {
  $local_tasks = $this->getLocalTasks();
  return !empty($local_tasks['tasks']);
}

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