class TestContextualLink in Drupal 8
Same name and namespace in other branches
- 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 |
Returns the group this contextual link should be rendered in. Overrides ContextualLinkInterface:: |
|
ContextualLinkDefault:: |
public | function |
Returns the link options passed to the link generator. Overrides ContextualLinkInterface:: |
|
ContextualLinkDefault:: |
public | function |
Returns the route name of the contextual link. Overrides ContextualLinkInterface:: |
|
ContextualLinkDefault:: |
public | function |
Returns the weight of the contextual link. Overrides ContextualLinkInterface:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
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 |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |
TestContextualLink:: |
public | function |
Returns the localized title to be shown for this contextual link. Overrides ContextualLinkDefault:: |