Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StaticPrefixCollection.php

function StaticPrefixCollection::populateCollection

Linearizes back a set of nested routes into a collection.

File

vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php, line 125

Class

StaticPrefixCollection
Prefix tree of routes preserving routes order.

Namespace

Symfony\Component\Routing\Matcher\Dumper

Code

public function populateCollection(RouteCollection $routes) : RouteCollection {
    foreach ($this->items as $route) {
        if ($route instanceof self) {
            $route->populateCollection($routes);
        }
        else {
            $routes->add(...$route);
        }
    }
    return $routes;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal