public function ContextualLinkDefault::getTitle in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault::getTitle()
Returns the localized title to be shown for this contextual link.
Subclasses may add optional arguments like NodeInterface $node = NULL that will be supplied by the ControllerResolver.
Return value
string The title to be shown for this action.
Overrides ContextualLinkInterface::getTitle
See also
\Drupal\Core\Menu\ContextualLinksManager::getTitle()
2 methods override 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.
- TestContextualLink::getTitle in core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Menu/ ContextualLink/ TestContextualLink.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\MenuCode
public function getTitle(Request $request = NULL) {
// The title from YAML file discovery may be a TranslatableMarkup object.
return (string) $this->pluginDefinition['title'];
}