Webiny\Component\Router\Route\RouteCollection::addOption PHP Method

addOption() public method

Adds an option for all the routes within the collection.
public addOption ( string $name, array $attributes )
$name string Name of the route parameter.
$attributes array Parameter attributes.
    public function addOption($name, array $attributes)
    {
        /**
         * @var Route $route
         */
        foreach ($this->routes as $route) {
            $route->addOption($name, $attributes);
        }
    }