function ContextualLinkDefault::getTitle

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault::getTitle()
  2. 10 core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault::getTitle()
  3. 8.9.x core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault::getTitle()
1 method overrides ContextualLinkDefault::getTitle()
ConfigTranslationContextualLink::getTitle in core/modules/config_translation/src/Plugin/Menu/ContextualLink/ConfigTranslationContextualLink.php
Returns the localized title to be shown for this contextual link.

File

core/lib/Drupal/Core/Menu/ContextualLinkDefault.php, line 16

Class

ContextualLinkDefault
Provides a common base implementation of a contextual link.

Namespace

Drupal\Core\Menu

Code

public function getTitle(Request $request = NULL) {
  // The title from YAML file discovery may be a TranslatableMarkup object.
  return (string) $this->pluginDefinition['title'];
}

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