diff --git a/book/routing.rst b/book/routing.rst index 09ebf2d94d8..dd69eb1ba9f 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1026,7 +1026,11 @@ instead of simply ``/hello/{name}``: use Symfony\Component\Routing\RouteCollection; $collection = new RouteCollection(); - $collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '/admin'); + + $acmeHello = $loader->import("@AcmeHelloBundle/Resources/config/routing.php"); + $acmeHello->setPrefix('/admin'); + + $collection->addCollection($acmeHello); return $collection; diff --git a/cookbook/routing/service_container_parameters.rst b/cookbook/routing/service_container_parameters.rst index 8b6d100e264..d7dbd5a6199 100644 --- a/cookbook/routing/service_container_parameters.rst +++ b/cookbook/routing/service_container_parameters.rst @@ -75,7 +75,7 @@ in your container: .. code-block:: php - # app/config/config.php + // app/config/config.php $container->setParameter('acme_demo.locales', 'en|es'); You can also use a parameter to define your route path (or part of your