Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Menu / LocalActionManagerInterface.php
1 <?php
2
3 namespace Drupal\Core\Menu;
4
5 use Drupal\Component\Plugin\PluginManagerInterface;
6
7 /**
8  * Manages discovery and instantiation of menu local action plugins.
9  *
10  * Menu local actions are links that lead to actions like "add new". The plugin
11  * format allows them (if needed) to dynamically generate a title or the path
12  * they link to. The annotation on the plugin provides the default title,
13  * and the list of routes where the action should be rendered.
14  */
15 interface LocalActionManagerInterface extends PluginManagerInterface {
16
17   /**
18    * Gets the title for a local action.
19    *
20    * @param \Drupal\Core\Menu\LocalActionInterface $local_action
21    *   An object to get the title from.
22    *
23    * @return string
24    *   The title (already localized).
25    *
26    * @throws \BadMethodCallException
27    *   If the plugin does not implement the getTitle() method.
28    */
29   public function getTitle(LocalActionInterface $local_action);
30
31   /**
32    * Finds all local actions that appear on a named route.
33    *
34    * @param string $route_appears
35    *   The route name for which to find local actions.
36    *
37    * @return array
38    *   An array of link render arrays.
39    */
40   public function getActionsForRoute($route_appears);
41
42 }