class TestContextualLink in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/ContextualLink/TestContextualLink.php \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
- 9 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\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Menu\ContextualLinkDefault implements ContextualLinkInterface
- class \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
- class \Drupal\Core\Menu\ContextualLinkDefault implements ContextualLinkInterface
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 11
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContextualLinkDefault:: |
public | function | ||
ContextualLinkDefault:: |
public | function | ||
ContextualLinkDefault:: |
public | function | ||
ContextualLinkDefault:: |
public | function | ||
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | 2 | |
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 53 |
TestContextualLink:: |
public | function |
Returns the localized title to be shown for this contextual link. Overrides ContextualLinkDefault:: |