-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[best practices] mostly typos #6348
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ form in its own PHP class:: | |
Put the form type classes in the ``AppBundle\Form`` namespace, unless you | ||
use other custom form classes like data transformers. | ||
|
||
To use the class, use ``createForm`` and instantiate the new class:: | ||
To use the class, use ``createForm()`` and instantiate the new class:: | ||
|
||
// ... | ||
use AppBundle\Form\PostType; | ||
|
@@ -160,8 +160,8 @@ thing in one line to rendering each part of each field independently. The | |
best way depends on how much customization you need. | ||
|
||
One of the simplest ways - which is especially useful during development - | ||
is to render the form tags and use ``form_widget()`` to render all of the | ||
fields: | ||
is to render the form tags and use Twig ``form_widget()`` function to render | ||
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 use either " |
||
all of the fields: | ||
|
||
.. code-block:: html+twig | ||
|
||
|
@@ -171,7 +171,7 @@ fields: | |
|
||
If you need more control over how your fields are rendered, then you should | ||
remove the ``form_widget(form)`` function and render your fields individually. | ||
See the :doc:`/cookbook/form/form_customization` article for more information | ||
See the :doc:`/cookbook/form/form_customization` cookbook article for more information | ||
on this and how you can control *how* the form renders at a global level | ||
using form theming. | ||
|
||
|
@@ -204,9 +204,9 @@ Handling a form submit usually follows a similar template: | |
|
||
There are really only two notable things here. First, we recommend that you | ||
use a single action for both rendering the form and handling the form submit. | ||
For example, you *could* have a ``newAction`` that *only* renders the form | ||
and a ``createAction`` that *only* processes the form submit. Both those | ||
actions will be almost identical. So it's much simpler to let ``newAction`` | ||
For example, you *could* have a ``newAction()`` that *only* renders the form | ||
and a ``createAction()`` that *only* processes the form submit. Both those | ||
actions will be almost identical. So it's much simpler to let ``newAction()`` | ||
handle everything. | ||
|
||
Second, we recommend using ``$form->isSubmitted()`` in the ``if`` statement | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As I explained in another great PR of you, I don't like using
()
for annotations.