class TestContextualLink

Same name in other branches
  1. 9 core/modules/system/tests/modules/menu_test/src/Plugin/Menu/ContextualLink/TestContextualLink.php \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
  2. 8.9.x core/modules/system/tests/modules/menu_test/src/Plugin/Menu/ContextualLink/TestContextualLink.php \Drupal\menu_test\Plugin\Menu\ContextualLink\TestContextualLink
  3. 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\ContextualLink
View source
class TestContextualLink extends ContextualLinkDefault {
    
    /**
     * {@inheritdoc}
     */
    public function getTitle(?Request $request = NULL) {
        return "<script>alert('Welcome to the jungle!')</script>";
    }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title Overrides
ContextualLinkDefault::getGroup public function Overrides ContextualLinkInterface::getGroup
ContextualLinkDefault::getOptions public function Overrides ContextualLinkInterface::getOptions
ContextualLinkDefault::getRouteName public function Overrides ContextualLinkInterface::getRouteName
ContextualLinkDefault::getWeight public function 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 Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Overrides PluginInspectionInterface::getPluginDefinition
PluginBase::getPluginId public function Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable Deprecated public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 6
TestContextualLink::getTitle public function Overrides ContextualLinkDefault::getTitle

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