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 fdc460d

Browse filesBrowse files
committed
Minor standard fix for best practices guide
1 parent 2a97453 commit fdc460d
Copy full SHA for fdc460d

File tree

Expand file treeCollapse file tree

1 file changed

+3
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-9
lines changed

‎best_practices/forms.rst

Copy file name to clipboardExpand all lines: best_practices/forms.rst
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Building Forms
1515
The Form component allows you to build forms right inside your controller
1616
code. Honestly, unless you need to reuse the form somewhere else, that's
1717
totally fine. But for organize and reuse, we recommend that you define each
18-
form in its own PHP class:
19-
20-
.. code-block:: php
18+
form in its own PHP class::
2119

2220
namespace AppBundle\Form;
2321

@@ -51,9 +49,7 @@ form in its own PHP class:
5149
}
5250
}
5351

54-
To use the class, use ``createForm`` and instantiate the new class:
55-
56-
.. code-block:: php
52+
To use the class, use ``createForm`` and instantiate the new class::
5753

5854
use AppBundle\Form\PostType;
5955
// ...
@@ -108,9 +104,7 @@ directly in your form class, this would effectively limit the scope of that form
108104
109105
This form *may* have been designed for creating posts, but if you wanted
110106
to reuse it for editing posts, the button label would be wrong. Instead,
111-
some developers configure form buttons in the controller:
112-
113-
.. code-block:: php
107+
some developers configure form buttons in the controller::
114108

115109
namespace AppBundle\Controller\Admin;
116110

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.