Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aabcf2d

Browse filesBrowse files
committed
minor symfony#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
Copy full SHA for aabcf2d

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎routing.rst

Copy file name to clipboardExpand all lines: routing.rst
+6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.