3 namespace Drupal\Core\Menu;
5 use Drupal\Component\Plugin\PluginManagerInterface;
8 * Manages discovery and instantiation of menu local action plugins.
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.
15 interface LocalActionManagerInterface extends PluginManagerInterface {
18 * Gets the title for a local action.
20 * @param \Drupal\Core\Menu\LocalActionInterface $local_action
21 * An object to get the title from.
24 * The title (already localized).
26 * @throws \BadMethodCallException
27 * If the plugin does not implement the getTitle() method.
29 public function getTitle(LocalActionInterface $local_action);
32 * Finds all local actions that appear on a named route.
34 * @param string $route_appears
35 * The route name for which to find local actions.
38 * An array of link render arrays.
40 public function getActionsForRoute($route_appears);