public function ContextualLinkManager::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Menu/ContextualLinkManager.php \Drupal\Core\Menu\ContextualLinkManager::__construct()
Constructs a new ContextualLinkManager instance.
Parameters
\Drupal\Core\Controller\ControllerResolverInterface $controller_resolver: The controller resolver.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: 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.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
Overrides DefaultPluginManager::__construct
File
- core/
lib/ Drupal/ Core/ Menu/ ContextualLinkManager.php, line 100
Class
- ContextualLinkManager
- Defines a contextual link plugin manager to deal with contextual links.
Namespace
Drupal\Core\MenuCode
public function __construct(ControllerResolverInterface $controller_resolver, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager, AccessManagerInterface $access_manager, AccountInterface $account, RequestStack $request_stack) {
$this->factory = new ContainerFactory($this, '\\Drupal\\Core\\Menu\\ContextualLinkInterface');
$this->controllerResolver = $controller_resolver;
$this->accessManager = $access_manager;
$this->account = $account;
$this->moduleHandler = $module_handler;
$this->requestStack = $request_stack;
$this
->alterInfo('contextual_links_plugins');
$this
->setCacheBackend($cache_backend, 'contextual_links_plugins:' . $language_manager
->getCurrentLanguage()
->getId(), [
'contextual_links_plugins',
]);
}