You are here

public function RouteCollection::addDefaults in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/RouteCollection.php \Symfony\Component\Routing\RouteCollection::addDefaults()

Adds defaults to all routes.

An existing default value under the same name in a route will be overridden.

Parameters

array $defaults An array of default values:

1 method overrides RouteCollection::addDefaults()
ChainRouteCollection::addDefaults in vendor/symfony-cmf/routing/ChainRouteCollection.php
Adds defaults to all routes.

File

vendor/symfony/routing/RouteCollection.php, line 193

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

public function addDefaults(array $defaults) {
  if ($defaults) {
    foreach ($this->routes as $route) {
      $route
        ->addDefaults($defaults);
    }
  }
}