-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route callbacks #343
Labels
Comments
johanjanssens
added a commit
that referenced
this issue
May 15, 2020
This allows pages to be to redirect any url, anywhere, even when not in a page context.
johanjanssens
added a commit
that referenced
this issue
May 15, 2020
johanjanssens
added a commit
that referenced
this issue
May 15, 2020
identifiers by a custom scheme and rename 'pages' scheme to 'page'
johanjanssens
added a commit
that referenced
this issue
May 15, 2020
The callback is defined is as follows: 'function($route, $generate = false)' - $route: a ComPagesDispatcherRouteRouteInterface object - $generate: are we generating a url or resolving (default false) Callbacks are both supported for static and dynamic routes, in case of a dynamic route the callback is called only if the route could be succesfully resolved.
johanjanssens
added a commit
that referenced
this issue
May 16, 2020
Example: '/path/to/page' => [ 'generate' => function($route) { return true; }, 'resolve' => function($route) { return true; } ],
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add support for callbacks to the router to further improve flexibility and make it possible to extend the routing logic.
Todo
The text was updated successfully, but these errors were encountered: