public function CheckProvider::setChecks in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Access/CheckProvider.php \Drupal\Core\Access\CheckProvider::setChecks()
For each route, saves a list of applicable access checks to the route.
Parameters
\Symfony\Component\Routing\RouteCollection $routes: A collection of routes to apply checks to.
Overrides CheckProviderInterface::setChecks
File
- core/
lib/ Drupal/ Core/ Access/ CheckProvider.php, line 84 - Contains \Drupal\Core\Access\CheckProvider.
Class
- CheckProvider
- Loads access checkers from the container.
Namespace
Drupal\Core\AccessCode
public function setChecks(RouteCollection $routes) {
$this
->loadDynamicRequirementMap();
foreach ($routes as $route) {
if ($checks = $this
->applies($route)) {
$route
->setOption('_access_checks', $checks);
}
}
}