diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Menu/AddConfigTestEntityLocalAction.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Menu/AddConfigTestEntityLocalAction.php index 1f52554..214b0b5 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Menu/AddConfigTestEntityLocalAction.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Menu/AddConfigTestEntityLocalAction.php @@ -9,10 +9,10 @@ use Drupal\Core\Annotation\Translation; use Drupal\system\Plugin\MenuLocalActionBase; -use Drupal\system\Annotation\MenuLocalActionPlugin; +use Drupal\system\Annotation\MenuLocalAction; /** - * @MenuLocalActionPlugin( + * @MenuLocalAction( * id = "config_test_entity_add_local_action", * route_name = "config_test_entity_add", * title = @Translation("Add test configuration"), diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Menu/AddFilterFormatLocalAction.php b/core/modules/filter/lib/Drupal/filter/Plugin/Menu/AddFilterFormatLocalAction.php index 096c300..60bf9c9 100644 --- a/core/modules/filter/lib/Drupal/filter/Plugin/Menu/AddFilterFormatLocalAction.php +++ b/core/modules/filter/lib/Drupal/filter/Plugin/Menu/AddFilterFormatLocalAction.php @@ -9,10 +9,10 @@ use Drupal\Core\Annotation\Translation; use Drupal\system\Plugin\MenuLocalActionBase; -use Drupal\system\Annotation\MenuLocalActionPlugin; +use Drupal\system\Annotation\MenuLocalAction; /** - * @MenuLocalActionPlugin( + * @MenuLocalAction( * id = "filter_format_add_local_action", * route_name = "filter_format_add", * title = @Translation("Add text format"), diff --git a/core/modules/system/lib/Drupal/system/Annotation/MenuLocalActionPlugin.php b/core/modules/system/lib/Drupal/system/Annotation/MenuLocalAction.php similarity index 77% rename from core/modules/system/lib/Drupal/system/Annotation/MenuLocalActionPlugin.php rename to core/modules/system/lib/Drupal/system/Annotation/MenuLocalAction.php index 21e0e1a..1a09a16 100644 --- a/core/modules/system/lib/Drupal/system/Annotation/MenuLocalActionPlugin.php +++ b/core/modules/system/lib/Drupal/system/Annotation/MenuLocalAction.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\system\Annotation\MenuLocalActionPlugin. + * Contains \Drupal\system\Annotation\MenuLocalAction. */ namespace Drupal\system\Annotation; @@ -10,11 +10,11 @@ use Drupal\Component\Annotation\Plugin; /** - * Defines a MenuLocalActionPlugin type annotation object. + * Defines a MenuLocalAction type Plugin annotation object. * * @Annotation */ -class MenuLocalActionPlugin extends Plugin { +class MenuLocalAction extends Plugin { /** * The ID. diff --git a/core/modules/system/lib/Drupal/system/Plugin/MenuLocalActionInterface.php b/core/modules/system/lib/Drupal/system/Plugin/MenuLocalActionInterface.php index 250e09c..37c6bd3 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/MenuLocalActionInterface.php +++ b/core/modules/system/lib/Drupal/system/Plugin/MenuLocalActionInterface.php @@ -13,28 +13,11 @@ interface MenuLocalActionInterface { /** - * Get the route name from the settings. + * Gets the route name from the settings. * * @return string * The name of the route this action links to. */ public function getRouteName(); - /** - * Implmentations of this interface must also implement two controller - * methods to get the title and path. These can have variable arguments - * supplied by the ControllerResolver from the Request, hence are not - * formally part of the interface. - */ - - /** - * Return the localized title to be shown for this action. - */ -// public function getTitle(); - - /** - * Return an internal Drupal path to use when linking to the action. - */ -// public function getPath(); - } diff --git a/core/modules/system/lib/Drupal/system/Plugin/Type/MenuLocalActionManager.php b/core/modules/system/lib/Drupal/system/Plugin/Type/MenuLocalActionManager.php index 0c5dde9..864f874 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Type/MenuLocalActionManager.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Type/MenuLocalActionManager.php @@ -60,15 +60,16 @@ class MenuLocalActionManager extends DefaultPluginManager { */ public function __construct(\Traversable $namespaces, ControllerResolver $controller_resolver, Request $request) { $annotation_namespaces = array('Drupal\system\Annotation' => $namespaces['Drupal\system']); - parent::__construct('Menu', $namespaces, $annotation_namespaces, 'Drupal\system\Annotation\MenuLocalActionPlugin'); + parent::__construct('Menu', $namespaces, $annotation_namespaces, 'Drupal\system\Annotation\MenuLocalAction'); $this->controllerResolver = $controller_resolver; $this->request = $request; } /** - * Get the title for a local action. + * Gets the title for a local action. * * @param \Drupal\system\Plugin\MenuLocalActionInterface $local_action + * An object to get the title from. * * @return string * The title (already localized). @@ -85,9 +86,10 @@ public function getTitle(MenuLocalActionInterface $local_action) { } /** - * Get the Drupal path for a local action. + * Gets the Drupal path for a local action. * * @param \Drupal\system\Plugin\MenuLocalActionInterface $local_action + * An object to get the path from. * * @return string * The path. @@ -104,9 +106,10 @@ public function getPath(MenuLocalActionInterface $local_action) { } /** - * Find all local actions that appear on a named route. + * Finds all local actions that appear on a named route. * * @param string $route_name + * The route for which to find local actions. * * @return array * Objects implementing MenuLocalActionInterface that appear on the route path. diff --git a/core/modules/system/tests/modules/menu_test/lib/Drupal/menu_test/Plugin/Menu/MenuTestLocalAction.php b/core/modules/system/tests/modules/menu_test/lib/Drupal/menu_test/Plugin/Menu/MenuTestLocalAction.php index e538040..57198c5 100644 --- a/core/modules/system/tests/modules/menu_test/lib/Drupal/menu_test/Plugin/Menu/MenuTestLocalAction.php +++ b/core/modules/system/tests/modules/menu_test/lib/Drupal/menu_test/Plugin/Menu/MenuTestLocalAction.php @@ -1,4 +1,5 @@