Download the PHP package yasiekz/router-bundle without Composer
On this page you can find all versions of the php package yasiekz/router-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package router-bundle
README
Bundle that provides aviability of generating URL address to objects instead of giving route name and route parameters
Instalation
Add bundle in your AppKernel.php
Bundle automatically overrides default symfony2 routing service.
Additional Configuration
There is no additional configuration required.
What interface should I use?
We have two interfaces avaiable. The RoutableCmsInterface is useful when you want to have more than one routing per object for example in CMS systems, where you might want to have diffrent routing for edit, delete object. The RoutableFrontInterface is useful for websites when there is only only one routing per object, but one object might have many routes depends on for example category that object belongs. TheRoutableMultiFrontStrategy is combo of both interfaces.
Usage:
RoutableCmsInterface
The URL is generated as same as default in Symfony2.
From controller:
The example above generates indirect address to object $object for destination 'edit'
From twig:
RoutableFrontInterface
Usage
The URL is generated as same as default in symfony2.
From controller:
The example above generates indirect address to object $object without transmission any additional params. Will be taken only params from getRouterParameters() method from class YourClass.
From Twig:
RoutableMultiFrontInterface
Usage
The URL is generated as same as default in symfony2.
From controller:
The example above generates indirect address to object $object with transmission destination param, and merge this param with getRouterParameters() method from class YourClass
From Twig:
Important
There is no possibility that the one class implements all interfaces at the same time.
Contrubution
You are highly encouraged to participate in the development. The terms are the same as the symfony2 http://symfony.com/doc/current/contributing/code/patches.html