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