public function LocalTaskManager::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::__construct()
- 9 core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::__construct()
Constructs a \Drupal\Core\Menu\LocalTaskManager object.
Parameters
\Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface $argument_resolver: An object to use in resolving route arguments.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request object to use for building titles and paths for plugin instances.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider to load routes by name.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Access\AccessManagerInterface $access_manager: The access manager.
\Drupal\Core\Session\AccountInterface $account: The current user.
Overrides DefaultPluginManager::__construct
File
- core/
lib/ Drupal/ Core/ Menu/ LocalTaskManager.php, line 131
Class
- LocalTaskManager
- Provides the default local task manager using YML as primary definition.
Namespace
Drupal\Core\MenuCode
public function __construct(ArgumentResolverInterface $argument_resolver, RequestStack $request_stack, RouteMatchInterface $route_match, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, AccessManagerInterface $access_manager, AccountInterface $account) {
$this->factory = new ContainerFactory($this, '\\Drupal\\Core\\Menu\\LocalTaskInterface');
$this->argumentResolver = $argument_resolver;
$this->requestStack = $request_stack;
$this->routeMatch = $route_match;
$this->routeProvider = $route_provider;
$this->accessManager = $access_manager;
$this->account = $account;
$this->moduleHandler = $module_handler;
$this
->alterInfo('local_tasks');
$this
->setCacheBackend($cache, 'local_task_plugins:' . $language_manager
->getCurrentLanguage()
->getId(), [
'local_task',
]);
}