You are here

public function LocalTaskDefault::getTitle in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::getTitle()

Returns the localized title to be shown for this tab.

Subclasses may add optional arguments like NodeInterface $node = NULL that will be supplied by the ControllerResolver.

Return value

string The title of the local task.

Overrides LocalTaskInterface::getTitle

4 methods override LocalTaskDefault::getTitle()
ConfigTranslationLocalTask::getTitle in core/modules/config_translation/src/Plugin/Menu/LocalTask/ConfigTranslationLocalTask.php
Returns the localized title to be shown for this tab.
TestTasksSettingsSub1::getTitle in core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalTask/TestTasksSettingsSub1.php
Returns the localized title to be shown for this tab.
TestTaskWithUserInput::getTitle in core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalTask/TestTaskWithUserInput.php
Returns the localized title to be shown for this tab.
UnapprovedComments::getTitle in core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php
Returns the localized title to be shown for this tab.

File

core/lib/Drupal/Core/Menu/LocalTaskDefault.php, line 79

Class

LocalTaskDefault
Default object used for LocalTaskPlugins.

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