function CheckProvider::setChecks

Same name in other branches
  1. 9 core/lib/Drupal/Core/Access/CheckProvider.php \Drupal\Core\Access\CheckProvider::setChecks()
  2. 8.9.x core/lib/Drupal/Core/Access/CheckProvider.php \Drupal\Core\Access\CheckProvider::setChecks()
  3. 11.x core/lib/Drupal/Core/Access/CheckProvider.php \Drupal\Core\Access\CheckProvider::setChecks()

File

core/lib/Drupal/Core/Access/CheckProvider.php, line 102

Class

CheckProvider
Loads access checkers from the container.

Namespace

Drupal\Core\Access

Code

public function setChecks(RouteCollection $routes) {
    foreach ($routes as $route) {
        if ($checks = $this->applies($route)) {
            $route->setOption('_access_checks', $checks);
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.