public function TestLocalAction5::getTitle in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction5.php \Drupal\menu_test\Plugin\Menu\LocalAction\TestLocalAction5::getTitle()
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 LocalActionDefault::getTitle
See also
\Drupal\Core\Menu\LocalActionManager::getTitle()
File
- core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Menu/ LocalAction/ TestLocalAction5.php, line 16
Class
- TestLocalAction5
- Defines a local action plugin with a dynamic title from user input.
Namespace
Drupal\menu_test\Plugin\Menu\LocalActionCode
public function getTitle(Request $request = NULL) {
return "<script>alert('Welcome to the jungle!')</script>";
}