You are here

public function ViewsMenuLink::getTitle in Drupal 8

Same name and namespace in other branches
  1. 9 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 116

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'];
}