You are here

public function ChainRouteCollection::addRequirements in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/ChainRouteCollection.php \Symfony\Cmf\Component\Routing\ChainRouteCollection::addRequirements()

Adds requirements to all routes.

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

Parameters

array $requirements An array of requirements:

Overrides RouteCollection::addRequirements

File

vendor/symfony-cmf/routing/ChainRouteCollection.php, line 190

Class

ChainRouteCollection

Namespace

Symfony\Cmf\Component\Routing

Code

public function addRequirements(array $requirements) {
  $this
    ->createInternalCollection();
  foreach ($this->routeCollections as $routeCollection) {
    $routeCollection
      ->addRequirements($requirements);
  }
}