Skip to content

Add Routing feature #10

@secondtruth

Description

@secondtruth
  • Routes defined in module.yml of 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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions