Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Menu/LocalActionInterface.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\Core\Routing\RouteMatchInterface; | |
6 | |
7 /** | |
8 * Defines an interface for menu local actions. | |
9 */ | |
10 interface LocalActionInterface { | |
11 | |
12 /** | |
13 * Get the route name from the settings. | |
14 * | |
15 * @return string | |
16 * The name of the route this action links to. | |
17 */ | |
18 public function getRouteName(); | |
19 | |
20 /** | |
21 * Returns the route parameters needed to render a link for the local action. | |
22 * | |
23 * @param \Drupal\Core\Routing\RouteMatchInterface $route_match | |
24 * The current route match. | |
25 * | |
26 * @return array | |
27 * An array of parameter names and values. | |
28 */ | |
29 public function getRouteParameters(RouteMatchInterface $route_match); | |
30 | |
31 /** | |
32 * Returns the weight for the local action. | |
33 * | |
34 * @return int | |
35 */ | |
36 public function getWeight(); | |
37 | |
38 /** | |
39 * Returns options for rendering a link for the local action. | |
40 * | |
41 * @param \Drupal\Core\Routing\RouteMatchInterface $route_match | |
42 * The current route match. | |
43 * | |
44 * @return array | |
45 * An associative array of options. | |
46 */ | |
47 public function getOptions(RouteMatchInterface $route_match); | |
48 | |
49 /** | |
50 * Returns the localized title to be shown for this action. | |
51 * | |
52 * Subclasses may add optional arguments like NodeInterface $node = NULL that | |
53 * will be supplied by the ControllerResolver. | |
54 * | |
55 * @return string | |
56 * The title to be shown for this action. | |
57 * | |
58 * @see \Drupal\Core\Menu\LocalActionManager::getTitle() | |
59 */ | |
60 public function getTitle(); | |
61 | |
62 } |