You are here

public function RouteCollection::setCondition in Zircon Profile 8

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

Sets a condition on all routes.

Existing conditions will be overridden.

Parameters

string $condition The condition:

File

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

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

public function setCondition($condition) {
  foreach ($this->routes as $route) {
    $route
      ->setCondition($condition);
  }
}