public function TestLocalActionManager::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php \Drupal\Tests\Core\Menu\TestLocalActionManager::__construct()
Constructs a LocalActionManager 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 stack.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.
\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 LocalActionManager::__construct
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalActionManagerTest.php, line 412 - Contains \Drupal\Tests\Core\Menu\LocalActionManagerTest.
Class
Namespace
Drupal\Tests\Core\MenuCode
public function __construct(ArgumentResolverInterface $argument_resolver, Request $request, RouteMatchInterface $route_match, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, AccessManagerInterface $access_manager, AccountInterface $account, DiscoveryInterface $discovery, FactoryInterface $factory) {
$this->discovery = $discovery;
$this->factory = $factory;
$this->routeProvider = $route_provider;
$this->accessManager = $access_manager;
$this->account = $account;
$this->argumentResolver = $argument_resolver;
$this->requestStack = new RequestStack();
$this->requestStack
->push($request);
$this->routeMatch = $route_match;
$this->moduleHandler = $module_handler;
$this
->alterInfo('menu_local_actions');
$this
->setCacheBackend($cache_backend, 'local_action_plugins', [
'local_action',
]);
}