Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bundles/routing-extra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ redirections and locales.

Notes:

* RouteObjectInterface: The provided documents implement this interface to map content to routes
* RouteObjectInterface: The provided documents implement this interface to map content to routes and to (optional) provide
a custom route name instead of the symfony core compatible route name.
* Redirections: This bundle provides a RedirectController.

TODO: see DependencyInjection/Configuration.php of this bundle. I could not figure out how to set
Expand Down
10 changes: 9 additions & 1 deletion components/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ The match method of the DynamicRouter does the following steps
RouteObjectInterface
~~~~~~~~~~~~~~~~~~~~

Routes that implement this interface are linked to a content document.
Routes that implement this interface can be linked to a content document using
the ``getRouteContent`` method. If non-null, this content is passed to the
controller. If there is no specific content for this route this may return null.

Furthermore, routes that implement this interface can also provide a custom route
name. The key returned by ``getRouteKey`` will be used as route name instead of
the Symfony core compatible route name and can contain any characters. This allows
you, for example, to set a path as the route name.

All routes still need to extend the base class ``Symfony\Component\Routing\Route``

Redirections
Expand Down