Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Menu / ContextualLinkInterface.php
1 <?php
2
3 namespace Drupal\Core\Menu;
4
5 /**
6  * Defines a contextual link plugin.
7  *
8  * Contextual links by default are in the module_name.links.contextual.yml
9  * file. These YAML files contain a list of contextual link plugin definitions,
10  * keyed by the plugin ID. Each definition must define a route_name and a group
11  * and might define title, options, and weight. See the getter methods on this
12  * interface for an explanation of each.
13  *
14  * @ingroup menu
15  */
16 interface ContextualLinkInterface {
17
18   /**
19    * Returns the localized title to be shown for this contextual link.
20    *
21    * Subclasses may add optional arguments like NodeInterface $node = NULL that
22    * will be supplied by the ControllerResolver.
23    *
24    * @return string
25    *   The title to be shown for this action.
26    *
27    * @see \Drupal\Core\Menu\ContextualLinksManager::getTitle()
28    */
29   public function getTitle();
30
31   /**
32    * Returns the route name of the contextual link.
33    *
34    * @return string
35    *   The name of the route this contextual link links to.
36    */
37   public function getRouteName();
38
39   /**
40    * Returns the group this contextual link should be rendered in.
41    *
42    * A contextual link group is a set of contextual links that are displayed
43    * together on a certain page. For example, the 'block' group displays all
44    * links related to the block, such as the block instance edit link as well as
45    * the views edit link, if it is a view block.
46    *
47    * @return string
48    *   The contextual links group name.
49    */
50   public function getGroup();
51
52   /**
53    * Returns the link options passed to the link generator.
54    *
55    * @return array
56    *   An associative array of options.
57    */
58   public function getOptions();
59
60   /**
61    * Returns the weight of the contextual link.
62    *
63    * The contextual links in one group are sorted by weight for display.
64    *
65    * @return int
66    *   The weight as positive/negative integer.
67    */
68   public function getWeight();
69
70 }