-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
- Routes defined in
module.ymlof each module
Work to be done
Implement routing system with Symfony Routing component. But not the regular way. The route mapping begins on module level at the second path segment (/foo/>...<, or at the moment /?p=foo/>...<).
It should be possible to set all of the configuration options of the Symfony component in the module configuration files (module.yml under routes entry, see example).
Then the raw routes will be connected with the corresponding mountpoint names and compiled in the Router class. Kernel::handle() then queries the Router.
Example
module.yml with new routes entry:
routes:
foo: # would become 'mountpoint_foo' for Symfony
path: /foo # would become '/mountpoint/foo'
action: action1 # controller action, raw name
bar:
path: /bar/{var}
action: action1
defaults: { var: blah }
foobar:
path: /{foobar}
action: action2
defaults: { foobar: abc }