-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Removed a wrong note about controllers as services #8669
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,8 +104,9 @@ defined above with the id ``app.hello_controller``:: | |
|
||
.. note:: | ||
|
||
You cannot drop the ``Action`` part of the method name when using this | ||
syntax. | ||
Unlike the traditional ``Bundle:Controller:method`` notation, when using | ||
this syntax the method name must match the original controller method name, | ||
so you cannot remove the ``Action`` suffix if the method includes it. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would make this a new sentence There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this wording? Make sure the method name in your route (e.g. ``indexAction``) matches the method name exactly.
Unlike the traditional ``Bundle:Controller:method`` notation, the `Action` suffix is not automatically
added for you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like your proposal. Much better. Thanks! |
||
|
||
You can also route to the service by using the same notation when defining | ||
the route ``_controller`` value: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but I think we should remove the
forward
example entirely and just keep the routing example (and probably move the note below the routing example).