Tuesday, 10 September 2013

Symfony 2 - "Internal" bundle routing

Symfony 2 - "Internal" bundle routing

Is there any way to register bundle's routing from within bundle itself
and not importing it in the main routing file? Now my routing.yml looks
like this:
my_route:
resource: "@MyExampleAdhocBundle/Resources/config/routing.yml"
prefix: /
However, I would like to somehow enable bundle routing in ExampleBundle
class or bundle config, so it will be on only if bundle is registered in
AppKernel.

No comments:

Post a Comment