@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | //we use the PRE_SUBMIT event to set the mode option |
74 | 74 | $builder->addEventListener( |
75 | 75 | FormEvents::PRE_SUBMIT, |
76 | - function (FormEvent $event) use ($options) { |
|
76 | + function(FormEvent $event) use ($options) { |
|
77 | 77 | //we get the raw data for the widget form |
78 | 78 | $rawData = $event->getData(); |
79 | 79 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | ]); |
118 | 118 | $builder->addEventListener( |
119 | 119 | FormEvents::PRE_SET_DATA, |
120 | - function (FormEvent $event) use ($options) { |
|
120 | + function(FormEvent $event) use ($options) { |
|
121 | 121 | $dataSources = $options['dataSources']->getDataSources(); |
122 | 122 | $widget = $event->getData(); |
123 | 123 | foreach ($dataSources as $alias => $dataSource) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ); |
132 | 132 | $builder->addEventListener( |
133 | 133 | FormEvents::POST_SUBMIT, |
134 | - function (FormEvent $event) { |
|
134 | + function(FormEvent $event) { |
|
135 | 135 | $widget = $event->getData(); |
136 | 136 | /** @var Criteria $criteria */ |
137 | 137 | foreach ($widget->getCriterias() as $criteria) { |
@@ -89,7 +89,7 @@ |
||
89 | 89 | $pageId = $page->getId(); |
90 | 90 | $viewReference = array_filter( |
91 | 91 | $viewReferences, |
92 | - function ($e) use ($pageId) { |
|
92 | + function($e) use ($pageId) { |
|
93 | 93 | return $e->getViewId() == $pageId; |
94 | 94 | } |
95 | 95 | ); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $builder->addEventListener( |
56 | 56 | FormEvents::PRE_SET_DATA, |
57 | - function (FormEvent $event) use ($currentLocale, $currentBlog) { |
|
57 | + function(FormEvent $event) use ($currentLocale, $currentBlog) { |
|
58 | 58 | $data = $event->getData(); |
59 | 59 | $event->setData([ |
60 | 60 | 'locale' => $data['locale'] !== null ? $data['locale'] : $currentLocale, |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | if ($localesNb > 1 && $blogsNb > 1) { |
68 | 68 | $builder->addEventListener( |
69 | 69 | FormEvents::PRE_SUBMIT, |
70 | - function (FormEvent $event) use ($currentLocale, $currentBlog, $localesNb) { |
|
70 | + function(FormEvent $event) use ($currentLocale, $currentBlog, $localesNb) { |
|
71 | 71 | $data = $event->getData(); |
72 | 72 | $currentLocale = $data['locale'] !== null ? $data['locale'] : $currentLocale; |
73 | 73 | $availableBlogs = $localesNb > 1 ? $this->blogRepository->getBlogsForLocale($currentLocale) : $this->blogRepository->findAll(); |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | $additionalParameters = [ |
127 | 127 | 'choices' => $availableBlogs, |
128 | 128 | 'choices_as_values' => true, |
129 | - 'choice_value' => function (Blog $currentBlog) { |
|
129 | + 'choice_value' => function(Blog $currentBlog) { |
|
130 | 130 | return $currentBlog->getId(); |
131 | 131 | }, |
132 | - 'choice_label' => function (Blog $currentBlog) use ($currentLocale) { |
|
132 | + 'choice_label' => function(Blog $currentBlog) use ($currentLocale) { |
|
133 | 133 | $currentBlog->setCurrentLocale($currentLocale); |
134 | 134 | |
135 | 135 | return $currentBlog->getName(); |