Skip to content

wrap code example with class #11290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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