public function 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:

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php, line 187

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);
    }
  }
}