8000 wrap code example with class · symfony/symfony-docs@292e1eb · GitHub
[go: up one dir, main page]

Skip to content

Commit 292e1eb

Browse files
committed
wrap code example with class
1 parent e523833 commit 292e1eb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

form/dynamic_form_modification.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,16 @@ The service can be injected into the form via its constructor::
237237
use Symfony\Component\Security\Core\Security;
238238
// ...
239239

240-
private $security;
241-
242-
public function __construct(Security $security)
240+
class FriendMessageFormType extends AbstractType
243241
{
244-
$this->security = $security;
242+
private $security;
243+
244+
public function __construct(Security $security)
245+
{
246+
$this->security = $security;
247+
}
248+
249+
// ....
245250
}
246251

247252
Customizing the Form Type

0 commit comments

Comments
 (0)
0