class ContextualLinkDefault
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault
- 8.9.x core/lib/Drupal/Core/Menu/ContextualLinkDefault.php \Drupal\Core\Menu\ContextualLinkDefault
- 11.x 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 \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Menu\ContextualLinkDefault extends \Drupal\Component\Plugin\PluginBase implements \Drupal\Core\Menu\ContextualLinkInterface
Expanded class hierarchy of ContextualLinkDefault
4 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 - ContextualLinkManagerTest.php in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.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
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.