@@ -116,7 +116,7 @@ the event listener might look like the following::
116
116
public function buildForm(FormBuilderInterface $builder, array $options)
117
117
{
118
118
// ...
119
- $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event){
119
+ $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
120
120
$product = $event->getData();
121
121
$form = $event->getForm();
122
122
@@ -147,7 +147,8 @@ the event listener might look like the following::
147
147
$builder->addEventListener(FormEvents::PRE_SET_DATA, array($this, 'onPreSetData'));
148
148
}
149
149
150
- public function onPreSetData(FormEvent $event){
150
+ public function onPreSetData(FormEvent $event)
151
+ {
151
152
// ...
152
153
}
153
154
}
@@ -253,7 +254,7 @@ Using an event listener, your form might look like this::
253
254
->add('subject', 'text')
254
255
->add('body', 'textarea')
255
256
;
256
- $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event){
257
+ $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
257
258
// ... add a choice list of friends of the current application user
258
259
});
259
260
}
@@ -656,7 +657,7 @@ field according to the current selection in the ``sport`` field:
656
657
<script>
657
658
var $sport = $('#meetup_sport');
658
659
// When sport gets selected ...
659
- $sport.change(function(){
660
+ $sport.change(function() {
660
661
// ... retrieve the corresponding form.
661
662
var $form = $(this).closest('form');
662
663
// Simulate form data, but only include the selected sport value.
@@ -691,7 +692,7 @@ field according to the current selection in the ``sport`` field:
691
692
<script>
692
693
var $sport = $('#meetup_sport');
693
694
// When sport gets selected ...
694
- $sport.change(function(){
695
+ $sport.change(function() {
695
696
// ... retrieve the corresponding form.
696
697
var $form = $(this).closest('form');
697
698
// Simulate form data, but only include the selected sport value.
0 commit comments