Skip to content

Commit

Permalink
minor symfony#11290 wrap code example with class (OskarStark)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
javiereguiluz committed Apr 4, 2019
2 parents 943dd10 + 292e1eb commit 46c4dd1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,16 @@ The service can be injected into the form via its constructor::
use Symfony\Component\Security\Core\Security;
// ...

private $security;

public function __construct(Security $security)
class FriendMessageFormType extends AbstractType
{
$this->security = $security;
private $security;

public function __construct(Security $security)
{
$this->security = $security;
}

// ....
}

Customizing the Form Type
Expand Down

0 comments on commit 46c4dd1

Please sign in to comment.