public function AccessAwareRouter::__construct

public AccessAwareRouter::__construct(ChainRouter $chain_router, AccessManagerInterface $access_manager, AccountInterface $account)

Constructs a router for Drupal with access check and upcasting.

Parameters

\Symfony\Cmf\Component\Routing\ChainRouter $chain_router: The chain router doing the actual routing.

\Drupal\Core\Access\AccessManagerInterface $access_manager: The access manager.

\Drupal\Core\Session\AccountInterface $account: The account to use in access checks.

File

core/lib/Drupal/Core/Routing/AccessAwareRouter.php, line 48

Class

AccessAwareRouter
A router class for Drupal with access check and upcasting.

Namespace

Drupal\Core\Routing

Code

public function __construct(ChainRouter $chain_router, AccessManagerInterface $access_manager, AccountInterface $account) {
  $this->chainRouter = $chain_router;
  $this->accessManager = $access_manager;
  $this->account = $account;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!AccessAwareRouter.php/function/AccessAwareRouter::__construct/8.1.x