You are here

public function ViewsMenuLink::getTitle in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/Menu/ViewsMenuLink.php \Drupal\views\Plugin\Menu\ViewsMenuLink::getTitle()

Returns the localized title to be shown for this link.

Return value

string The title of the menu link.

Overrides MenuLinkInterface::getTitle

File

core/modules/views/src/Plugin/Menu/ViewsMenuLink.php, line 117
Contains \Drupal\views\Plugin\Menu\ViewsMenuLink.

Class

ViewsMenuLink
Defines menu links provided by views.

Namespace

Drupal\views\Plugin\Menu

Code

public function getTitle() {

  // @todo Get the translated value from the config without instantiating the
  //   view. https://www.drupal.org/node/2310379
  return $this
    ->loadView()->display_handler
    ->getOption('menu')['title'];
}