function TestLocalAction5::getTitle

Same name in other branches
  1. 9 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction5.php \Drupal\menu_test\Plugin\Menu\LocalAction\TestLocalAction5::getTitle()
  2. 8.9.x core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction5.php \Drupal\menu_test\Plugin\Menu\LocalAction\TestLocalAction5::getTitle()
  3. 10 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction5.php \Drupal\menu_test\Plugin\Menu\LocalAction\TestLocalAction5::getTitle()

Overrides LocalActionDefault::getTitle

File

core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction5.php, line 18

Class

TestLocalAction5
Defines a local action plugin with a dynamic title from user input.

Namespace

Drupal\menu_test\Plugin\Menu\LocalAction

Code

public function getTitle(?Request $request = NULL) {
    return "<script>alert('Welcome to the jungle!')</script>";
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.