Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Menu/ContextualLinkDefault.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Menu; | |
4 | |
5 use Drupal\Component\Plugin\PluginBase; | |
6 use Symfony\Component\HttpFoundation\Request; | |
7 | |
8 /** | |
9 * Provides a common base implementation of a contextual link. | |
10 */ | |
11 class ContextualLinkDefault extends PluginBase implements ContextualLinkInterface { | |
12 | |
13 /** | |
14 * {@inheritdoc} | |
15 */ | |
16 public function getTitle(Request $request = NULL) { | |
17 // The title from YAML file discovery may be a TranslatableMarkup object. | |
18 return (string) $this->pluginDefinition['title']; | |
19 } | |
20 | |
21 /** | |
22 * {@inheritdoc} | |
23 */ | |
24 public function getRouteName() { | |
25 return $this->pluginDefinition['route_name']; | |
26 } | |
27 | |
28 /** | |
29 * {@inheritdoc} | |
30 */ | |
31 public function getGroup() { | |
32 return $this->pluginDefinition['group']; | |
33 } | |
34 | |
35 /** | |
36 * {@inheritdoc} | |
37 */ | |
38 public function getOptions() { | |
39 return $this->pluginDefinition['options']; | |
40 } | |
41 | |
42 /** | |
43 * {@inheritdoc} | |
44 */ | |
45 public function getWeight() { | |
46 return $this->pluginDefinition['weight']; | |
47 } | |
48 | |
49 } |