Adds a route.
@api
Parameters
string $name The route name:
Route $route A Route instance:
File
- drupal/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php, line 79
Class
- RouteCollection
- A RouteCollection represents a set of Route instances.
Namespace
Symfony\Component\Routing
Code
public function add($name, Route $route) {
unset($this->routes[$name]);
$this->routes[$name] = $route;
}