Skip to content

Commit aabcf2d

Browse files
committed
minor #6951 [Routing] Add a note for invokable controllers (chalasr)
This PR was merged into the 2.7 branch. Discussion ---------- [Routing] Add a note for invokable controllers Since this feature can help to avoid defining controllers as services or writing `Controller::__invoke` when it's not needed, I think we should document it. Commits ------- 0b046b3 [Routing] Add a note for refering invokable controllers
2 parents 18238aa + 0b046b3 commit aabcf2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

routing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,12 @@ and method: ``AppBundle\Controller\BlogController::showAction``. But if you
535535
follow some simple conventions, the logical name is more concise and allows
536536
more flexibility.
537537

538+
.. tip::
539+
540+
To refer to an action that is implemented as the ``__invoke()`` method of a controller class,
541+
you do not have to pass the method name, but can just use the fully qualified class name (e.g.
542+
``AppBundle\Controller\BlogController``).
543+
538544
.. note::
539545

540546
In addition to using the logical name or the fully-qualified class name,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy