function ViewsMenuLink::getTitle

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/Menu/ViewsMenuLink.php \Drupal\views\Plugin\Menu\ViewsMenuLink::getTitle()
  2. 10 core/modules/views/src/Plugin/Menu/ViewsMenuLink.php \Drupal\views\Plugin\Menu\ViewsMenuLink::getTitle()
  3. 11.x core/modules/views/src/Plugin/Menu/ViewsMenuLink.php \Drupal\views\Plugin\Menu\ViewsMenuLink::getTitle()

Overrides MenuLinkInterface::getTitle

File

core/modules/views/src/Plugin/Menu/ViewsMenuLink.php, line 109

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

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