Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitfdc460d

Browse files
committed
Minor standard fix for best practices guide
1 parent2a97453 commitfdc460d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎best_practices/forms.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp