ContextualLinkDefault::getTitle

public ContextualLinkDefault::getTitle(Request $request = NULL)

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()

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'];
}
doc_Drupal
2016-10-29 08:58:45
Comments
Leave a Comment

Please login to continue.