Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Routing] Allow extending Route attribute #53467

Closed
@tjveldhuizen

Description

@tjveldhuizen

Description

In our project, we are using invokable controllers. Because we have multiple 'environments' (pages for clubs, for individual members and for admins) served on sub domains, we have currently extended the Route annotation with a ClubRoute, PersonRoute and AdminRoute, containing the default hostname, a prefix for the routes and some defaults and requirements for the parameters in this route.

Since the Route attribute is final, extending of the attribute is not possible. Therefore we have to repeat this configuration in a lot of controllers. I understand the choice to make the Route final, but hope for a way to allow us using the preset routes. An alternative for removing the final status would be an option to register custom Route attributes for the routing system, but I haven't found a good extension point to do this.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions