diff --git a/core/core.services.yml b/core/core.services.yml index d2f7846..d555c89 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -170,7 +170,7 @@ services: arguments: ['@container.namespaces', '@cache.cache', '@language_manager', '@module_handler'] plugin.manager.action: class: Drupal\Core\Action\ActionManager - arguments: ['@container.namespaces', '@module_handler'] + arguments: ['@container.namespaces', '@cache.cache', '@language_manager', '@module_handler'] plugin.manager.menu.local_action: class: Drupal\Core\Menu\LocalActionManager arguments: ['@container.namespaces', '@controller_resolver', '@request', '@module_handler', '@cache.cache', '@language_manager'] diff --git a/core/lib/Drupal/Core/Action/ActionManager.php b/core/lib/Drupal/Core/Action/ActionManager.php index 859a2d6..b16cc8d 100644 --- a/core/lib/Drupal/Core/Action/ActionManager.php +++ b/core/lib/Drupal/Core/Action/ActionManager.php @@ -7,7 +7,9 @@ namespace Drupal\Core\Action; +use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Language\LanguageManager; use Drupal\Core\Plugin\DefaultPluginManager; /** @@ -24,13 +26,18 @@ class ActionManager extends DefaultPluginManager { * @param \Traversable $namespaces * An object that implements \Traversable which contains the root paths * keyed by the corresponding namespace to look for plugin implementations. + * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend + * Cache backend instance to use. + * @param \Drupal\Core\Language\LanguageManager $language_manager + * The language manager. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to invoke the alter hook with. */ - public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler) { + public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) { parent::__construct('Plugin/Action', $namespaces, array(), 'Drupal\Core\Annotation\Action'); $this->alterInfo($module_handler, 'action_info'); + $this->setCacheBackend($cache_backend, $language_manager, 'action_info'); } /**