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. 10 core/lib/Drupal/Core/Access/CheckProvider.php \Drupal\Core\Access\CheckProvider::setChecks()

Overrides CheckProviderInterface::setChecks

File

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

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.