function AccessAwareRouter::getRouteCollection

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::getRouteCollection()
  2. 10 core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::getRouteCollection()
  3. 11.x core/lib/Drupal/Core/Routing/AccessAwareRouter.php \Drupal\Core\Routing\AccessAwareRouter::getRouteCollection()

File

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

Class

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

Namespace

Drupal\Core\Routing

Code

public function getRouteCollection() : RouteCollection {
    if ($this->router instanceof RouterInterface) {
        return $this->router
            ->getRouteCollection();
    }
}

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