LocalActionDefault::getTitle

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

Returns the localized title to be shown for this action.

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 LocalActionInterface::getTitle

See also

\Drupal\Core\Menu\LocalActionManager::getTitle()

File

core/lib/Drupal/Core/Menu/LocalActionDefault.php, line 69

Class

LocalActionDefault
Provides a default implementation for local action plugins.

Namespace

Drupal\Core\Menu

Code

1
2
3
4
5
public function getTitle(Request $request = NULL) {
  // Subclasses may pull in the request or specific attributes as parameters.
  // The title from YAML file discovery may be a TranslatableMarkup object.
  return (string) $this->pluginDefinition['title'];
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.