interface LocalActionManagerInterface in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/LocalActionManagerInterface.php \Drupal\Core\Menu\LocalActionManagerInterface
Manages discovery and instantiation of menu local action plugins.
Menu local actions are links that lead to actions like "add new". The plugin format allows them (if needed) to dynamically generate a title or the path they link to. The annotation on the plugin provides the default title, and the list of routes where the action should be rendered.
Hierarchy
- interface \Drupal\Component\Plugin\Discovery\DiscoveryInterface; interface \Drupal\Component\Plugin\Factory\FactoryInterface; interface \Drupal\Component\Plugin\Mapper\MapperInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface
- interface \Drupal\Core\Menu\LocalActionManagerInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface
Expanded class hierarchy of LocalActionManagerInterface
All classes that implement LocalActionManagerInterface
2 files declare their use of LocalActionManagerInterface
- BlockLibraryController.php in core/
modules/ block/ src/ Controller/ BlockLibraryController.php - LocalActionsBlock.php in core/
lib/ Drupal/ Core/ Menu/ Plugin/ Block/ LocalActionsBlock.php
File
- core/
lib/ Drupal/ Core/ Menu/ LocalActionManagerInterface.php, line 15
Namespace
Drupal\Core\MenuView source
interface LocalActionManagerInterface extends PluginManagerInterface {
/**
* Gets the title for a local action.
*
* @param \Drupal\Core\Menu\LocalActionInterface $local_action
* An object to get the title from.
*
* @return string
* The title (already localized).
*
* @throws \BadMethodCallException
* If the plugin does not implement the getTitle() method.
*/
public function getTitle(LocalActionInterface $local_action);
/**
* Finds all local actions that appear on a named route.
*
* @param string $route_appears
* The route name for which to find local actions.
*
* @return array
* An array of link render arrays.
*/
public function getActionsForRoute($route_appears);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryInterface:: |
public | function | Gets a specific plugin definition. | 4 |
DiscoveryInterface:: |
public | function | Gets the definition of all plugins for this type. | 3 |
DiscoveryInterface:: |
public | function | Indicates if a specific plugin definition exists. | 1 |
FactoryInterface:: |
public | function | Creates a pre-configured instance of a plugin. | 6 |
LocalActionManagerInterface:: |
public | function | Finds all local actions that appear on a named route. | 1 |
LocalActionManagerInterface:: |
public | function | Gets the title for a local action. | 1 |
MapperInterface:: |
public | function | Gets a preconfigured instance of a plugin. | 3 |