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

Breadcrumb

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

function RouteCollection::addDefaults

Adds defaults to all routes.

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

File

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

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

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

API Navigation

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