class ContextualLinkDefault in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault
- 10 core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault
Provides a common base implementation of a contextual link.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Menu\ContextualLinkDefault implements ContextualLinkInterface
Expanded class hierarchy of ContextualLinkDefault
3 files declare their use of ContextualLinkDefault
- ConfigTranslationContextualLink.php in core/
modules/ config_translation/ src/ Plugin/ Menu/ ContextualLink/ ConfigTranslationContextualLink.php - ContextualLinkDefaultTest.php in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkDefaultTest.php - TestContextualLink.php in core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Menu/ ContextualLink/ TestContextualLink.php
File
- core/
lib/ Drupal/ Core/ Menu/ ContextualLinkDefault.php, line 11
Namespace
Drupal\Core\MenuView source
class ContextualLinkDefault extends PluginBase implements ContextualLinkInterface {
/**
* {@inheritdoc}
*/
public function getTitle(Request $request = NULL) {
// The title from YAML file discovery may be a TranslatableMarkup object.
return (string) $this->pluginDefinition['title'];
}
/**
* {@inheritdoc}
*/
public function getRouteName() {
return $this->pluginDefinition['route_name'];
}
/**
* {@inheritdoc}
*/
public function getGroup() {
return $this->pluginDefinition['group'];
}
/**
* {@inheritdoc}
*/
public function getOptions() {
return $this->pluginDefinition['options'];
}
/**
* {@inheritdoc}
*/
public function getWeight() {
return $this->pluginDefinition['weight'];
}
}
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 localized title to be shown for this contextual link. Overrides ContextualLinkInterface:: |
2 |
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:: |
2 |
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. | 98 |