Skip to content

Update examples of custom route loaders #13737

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

Merged
merged 1 commit into from
Jun 1, 2020
Merged
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
22 changes: 5 additions & 17 deletions routing/custom_route_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,10 @@ What is a Custom Route Loader
-----------------------------

A custom route loader enables you to generate routes based on some
conventions or patterns. A great example for this use-case is the
`FOSRestBundle`_ where routes are generated based on the names of the
action methods in a controller.

You still need to modify your routing configuration (e.g.
``config/routes.yaml``) manually, even when using a custom route
loader.

.. note::

There are many bundles out there that use their own route loaders to
accomplish cases like those described above, for instance
`FOSRestBundle`_, `JMSI18nRoutingBundle`_, `KnpRadBundle`_ and
`SonataAdminBundle`_.
conventions, patterns or integrations. An example for this use-case is the
`OpenAPI-Symfony-Routing`_ library where routes are generated based on
OpenAPI/Swagger annotations. Another example is the `SonataAdminBundle`_ that
creates routes based on CRUD conventions.

Loading Routes
--------------
Expand Down Expand Up @@ -461,8 +451,6 @@ configuration file - you can call the
combined, for example to keep using the default Symfony routing system when
writing a custom router.

.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle
.. _`JMSI18nRoutingBundle`: https://github.com/schmittjoh/JMSI18nRoutingBundle
.. _`KnpRadBundle`: https://github.com/KnpLabs/KnpRadBundle
.. _`OpenAPI-Symfony-Routing`: https://github.com/Tobion/OpenAPI-Symfony-Routing
.. _`SonataAdminBundle`: https://github.com/sonata-project/SonataAdminBundle
.. _`ChainRouter`: https://symfony.com/doc/current/cmf/components/routing/chain.html