zikula/core — pull request #1676 by cmfcmf (2014-04-22 17:42:03+00:00)
Title: [WIP] Routing enhancements

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ---
| Refs tickets | #1552
| License | MIT
| Doc PR | ---

This PR removes the previously added `CmfRoutingBundle` (which is not needed anymore) and adds the `I18nRoutingBundle` for multilingual routing. You need to run `composer update`.

Additionally I wrote a MOST-based [ZikulaRoutesModule](https://github.com/cmfcmf/ZikulaRoutesModule). Please move it into `modules/ZikulaRoutesModule` and install it (You might need to clear your cache before installation works). Then go to `index.php?module=routes&type=admin&func=view&ot=route` and click `Reload all routes`. Et voila, Routes are saved into database, are translatable, multilingual, etc. (Try adding a second language package to the core and clear the cache afterwards, also play around with the language settings (`index.php?module=settings&type=admin&func=multilingual` [you need to clear your cache after changing something there], change the default language and change the 'always append language to url setting').

A good page for experimenting is the useraccount page, as the users module is the only module where routes are (partly) supported.

Through Symfony Route Options you can pass additional details:
- `zkDescription` A description to display in the routes table.
- `i18n` (default true) Whether or not this route should be translatable.
- `zkNoBundlePrefix` (default false) If you set it to true, the route won't be prefixed with the module's url name.

More documentation follows when I have more time :smile: Also, the ZikulaRoutesModule should be moved into the core.