Skip to content

Commit 46c4dd1

Browse files
committed
minor symfony#11290 wrap code example with class (OskarStark)
This PR was merged into the 3.4 branch. Discussion ---------- wrap code example with class <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 292e1eb wrap code example with class
2 parents 943dd10 + 292e1eb commit 46c4dd1

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)