diff --git a/core/lib/Drupal/Core/Menu/LocalActionDefault.php b/core/lib/Drupal/Core/Menu/LocalActionDefault.php index 03dbbef..413938a 100644 --- a/core/lib/Drupal/Core/Menu/LocalActionDefault.php +++ b/core/lib/Drupal/Core/Menu/LocalActionDefault.php @@ -15,14 +15,14 @@ use Symfony\Component\HttpFoundation\Request; /** - * Provides defaults and base methods for menu local action plugins. + * Provides defaults implement of local action plugins. * * @todo This class needs more documentation and/or @see references. */ class LocalActionDefault extends PluginBase implements LocalActionInterface, ContainerFactoryPluginInterface { /** - * String translation object. + * The string translation object. * * @var \Drupal\Core\StringTranslation\Translator\TranslatorInterface */ diff --git a/core/lib/Drupal/Core/Menu/LocalActionInterface.php b/core/lib/Drupal/Core/Menu/LocalActionInterface.php index 4151160..75841de 100644 --- a/core/lib/Drupal/Core/Menu/LocalActionInterface.php +++ b/core/lib/Drupal/Core/Menu/LocalActionInterface.php @@ -23,7 +23,7 @@ public function getRouteName(); /** - * Returns the route parameters needed to render a link for the local task. + * Returns the route parameters needed to render a link for the local action. * * @param \Symfony\Component\HttpFoundation\Request $request * The HttpRequest object representing the current request. @@ -36,15 +36,16 @@ public function getRouteName(); public function getRouteParameters(Request $request); /** - * Returns the weight of the local task. -@@ -51,14 +55,17 @@ public function getPath(); + * Returns the weight for the local action. + */ + public function getPath(); public function getWeight(); /** - * Returns options for rendering a link to the local task. + * Returns options for rendering a link for the local action. * * @param \Symfony\Component\HttpFoundation\Request $request - * The HttpRequest object representing the current request. + * The HTTP request object representing the current request. * * @return array * An associative array of options. diff --git a/core/lib/Drupal/Core/Menu/LocalActionManager.php b/core/lib/Drupal/Core/Menu/LocalActionManager.php index c99869a..1013f8f 100644 --- a/core/lib/Drupal/Core/Menu/LocalActionManager.php +++ b/core/lib/Drupal/Core/Menu/LocalActionManager.php @@ -32,7 +32,7 @@ class LocalActionManager extends DefaultPluginManager { /** - * Provides some default values for all local action plugin.s + * Provides some default values for all local action plugins. * * @var array */ @@ -108,7 +108,8 @@ class LocalActionManager extends DefaultPluginManager { * The access manager. */ public function __construct(ControllerResolverInterface $controller_resolver, Request $request, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManager $language_manager, AccessManager $access_manager) { - // Skip calling the parent constructor, since that assumes annontation-based discovery + // Skip calling the parent constructor, since that assumes annotation-based + // discovery. $this->discovery = new YamlDiscovery('local_actions', $module_handler->getModuleDirectories()); $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery); $this->factory = new ContainerFactory($this); @@ -162,7 +163,7 @@ public function getActionsForRoute($route_appears) { } // Pre-fetch all the action route objects. This reduces the number of SQL // queries that would otherwise be triggered by the access manager. - $route_names ? $this->routeProvider->getRoutesByNames($route_names) : array(); + $this->routeProvider->getRoutesByNames($route_names); } $links = array(); foreach ($this->instances[$route_appears] as $plugin) {