class TestContextualLink
Same name in other branches
- 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
- 11.x 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 \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Menu\ContextualLinkDefault extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Core\Menu\ContextualLinkInterface
- class \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink extends \Drupal\Core\Menu\ContextualLinkDefault
- class \Drupal\Core\Menu\ContextualLinkDefault extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Core\Menu\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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ContextualLinkDefault::getGroup | public | function | Returns the group this contextual link should be rendered in. | Overrides ContextualLinkInterface::getGroup | |
ContextualLinkDefault::getOptions | public | function | Returns the link options passed to the link generator. | Overrides ContextualLinkInterface::getOptions | |
ContextualLinkDefault::getRouteName | public | function | Returns the route name of the contextual link. | Overrides ContextualLinkInterface::getRouteName | |
ContextualLinkDefault::getWeight | public | function | Returns the weight of the contextual link. | Overrides ContextualLinkInterface::getWeight | |
PluginBase::$configuration | protected | property | Configuration information passed into the plugin. | ||
PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | ||
PluginBase::$pluginId | protected | property | The plugin_id. | ||
PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | |||
PluginBase::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | Overrides DerivativeInspectionInterface::getBaseId | |
PluginBase::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | Overrides DerivativeInspectionInterface::getDerivativeId | |
PluginBase::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | Overrides PluginInspectionInterface::getPluginDefinition | |
PluginBase::getPluginId | public | function | Gets the plugin_id of the plugin instance. | Overrides PluginInspectionInterface::getPluginId | |
PluginBase::isConfigurable | public | function | Determines if the plugin is configurable. | ||
PluginBase::__construct | public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 8 | |
TestContextualLink::getTitle | public | function | Returns the localized title to be shown for this contextual link. | Overrides ContextualLinkDefault::getTitle |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.