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

Commit1e8b0d4

Browse files
author
Michaël Perrin
committed
Small fixes in code style
1 parent8093719 commit1e8b0d4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎cookbook/form/dynamic_form_modification.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ the event listener might look like the following::
116116
public function buildForm(FormBuilderInterface $builder, array $options)
117117
{
118118
// ...
119-
$builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event){
119+
$builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event){
120120
$product = $event->getData();
121121
$form = $event->getForm();
122122

@@ -147,7 +147,8 @@ the event listener might look like the following::
147147
$builder->addEventListener(FormEvents::PRE_SET_DATA, array($this, 'onPreSetData'));
148148
}
149149

150-
public function onPreSetData(FormEvent $event){
150+
public function onPreSetData(FormEvent $event)
151+
{
151152
// ...
152153
}
153154
}
@@ -253,7 +254,7 @@ Using an event listener, your form might look like this::
253254
->add('subject', 'text')
254255
->add('body', 'textarea')
255256
;
256-
$builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event){
257+
$builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event){
257258
// ... add a choice list of friends of the current application user
258259
});
259260
}
@@ -656,7 +657,7 @@ field according to the current selection in the ``sport`` field:
656657
<script>
657658
var $sport = $('#meetup_sport');
658659
// When sport gets selected ...
659-
$sport.change(function(){
660+
$sport.change(function(){
660661
// ... retrieve the corresponding form.
661662
var $form = $(this).closest('form');
662663
// Simulate form data, but only include the selected sport value.
@@ -691,7 +692,7 @@ field according to the current selection in the ``sport`` field:
691692
<script>
692693
var $sport = $('#meetup_sport');
693694
// When sport gets selected ...
694-
$sport.change(function(){
695+
$sport.change(function(){
695696
// ... retrieve the corresponding form.
696697
var $form = $(this).closest('form');
697698
// Simulate form data, but only include the selected sport value.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp