function AccessAwareRouter::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::__construct()
- 10 core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::__construct()
- 9 core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::__construct()
- 8.9.x core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::__construct()
Constructs a router for Drupal with access check and upcasting.
Parameters
\Symfony\Component\Routing\RouterInterface $router: The router doing the actual routing.
\Drupal\Core\Access\AccessManagerInterface $accessManager: The access manager.
\Drupal\Core\Session\AccountInterface $account: The account to use in access checks.
File
-
core/
lib/ Drupal/ Core/ Routing/ AccessAwareRouter.php, line 33
Class
- AccessAwareRouter
- A router class for Drupal with access check and upcasting.
Namespace
Drupal\Core\RoutingCode
public function __construct(protected RouterInterface $router, protected AccessManagerInterface $accessManager, protected AccountInterface $account) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.