class TestContextualLink
Same name in other branches
- 9 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/ContextualLink/TestContextualLink.php \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
- 8.9.x core/modules/system/tests/modules/menu_test/src/Plugin/Menu/ContextualLink/TestContextualLink.php \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
- 10 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/ContextualLink/TestContextualLink.php \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
Defines a contextual link plugin with a dynamic title from user input.
Hierarchy
- class \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink extends \Drupal\Core\Menu\ContextualLinkDefault
Expanded class hierarchy of TestContextualLink
1 string reference to 'TestContextualLink'
- menu_test.links.contextual.yml in core/
modules/ system/ tests/ modules/ menu_test/ menu_test.links.contextual.yml - core/modules/system/tests/modules/menu_test/menu_test.links.contextual.yml
File
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Menu/ ContextualLink/ TestContextualLink.php, line 13
Namespace
Drupal\menu_test\Plugin\Menu\ContextualLinkView source
class TestContextualLink extends ContextualLinkDefault {
/**
* {@inheritdoc}
*/
public function getTitle(?Request $request = NULL) {
return "<script>alert('Welcome to the jungle!')</script>";
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.