public function ChainRouter::getRouteCollection

Gets the RouteCollection instance associated with this Router.

Return value

RouteCollection A RouteCollection instance

Overrides RouterInterface::getRouteCollection

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainRouter.php, line 271

Class

ChainRouter
ChainRouter

Namespace

Symfony\Cmf\Component\Routing

Code

public function getRouteCollection() {
  if (!$this->routeCollection instanceof RouteCollection) {
    $this->routeCollection = new RouteCollection();
    foreach ($this
      ->all() as $router) {
      $this->routeCollection
        ->addCollection($router
        ->getRouteCollection());
    }
  }
  return $this->routeCollection;
}