@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | return new JsonResponse([ |
| 139 | 139 | 'success' => true, |
| 140 | - 'url' => $this->generateUrl('victoire_core_page_show', ['_locale' => $blog->getLocale(), 'url' => $blog->getUrl()]),]); |
|
| 140 | + 'url' => $this->generateUrl('victoire_core_page_show', ['_locale' => $blog->getLocale(), 'url' => $blog->getUrl()]), ]); |
|
| 141 | 141 | } |
| 142 | 142 | //we display the form |
| 143 | 143 | $errors = $this->get('victoire_form.error_helper')->getRecursiveReadableErrors($form); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | return new JsonResponse([ |
| 199 | 199 | 'success' => true, |
| 200 | - 'url' => $this->generateUrl('victoire_core_page_show', ['_locale' => $blog->getLocale(), 'url' => $blog->getUrl()]),]); |
|
| 200 | + 'url' => $this->generateUrl('victoire_core_page_show', ['_locale' => $blog->getLocale(), 'url' => $blog->getUrl()]), ]); |
|
| 201 | 201 | } |
| 202 | 202 | //we display the form |
| 203 | 203 | $errors = $this->get('victoire_form.error_helper')->getRecursiveReadableErrors($form); |
@@ -40,14 +40,14 @@ |
||
| 40 | 40 | ->add('image', 'media'); |
| 41 | 41 | |
| 42 | 42 | // manage conditional related status in preset data |
| 43 | - $builder->get('status')->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 43 | + $builder->get('status')->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 44 | 44 | $data = $event->getData(); |
| 45 | 45 | $form = $event->getForm(); |
| 46 | 46 | self::manageRelatedStatus($data, $form->getParent()); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | 49 | // manage conditional related status in pre submit (ajax call to refresh view) |
| 50 | - $builder->get('status')->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 50 | + $builder->get('status')->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 51 | 51 | $form = $event->getForm(); |
| 52 | 52 | $data = $event->getData(); |
| 53 | 53 | self::manageRelatedStatus($data, $form->getParent()); |
@@ -59,25 +59,25 @@ discard block |
||
| 59 | 59 | ]) |
| 60 | 60 | ->remove('visibleOnFront'); |
| 61 | 61 | |
| 62 | - $builder->get('blog')->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 62 | + $builder->get('blog')->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 63 | 63 | $data = $event->getData(); |
| 64 | 64 | $parent = $event->getForm()->getParent(); |
| 65 | 65 | $this->manageCategories($data, $parent); |
| 66 | 66 | $this->manageTemplate($data, $parent); |
| 67 | 67 | }); |
| 68 | 68 | |
| 69 | - $builder->get('blog')->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 69 | + $builder->get('blog')->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 70 | 70 | $data = $event->getData(); |
| 71 | 71 | $parent = $event->getForm()->getParent(); |
| 72 | 72 | $this->manageCategories($data, $parent); |
| 73 | 73 | }); |
| 74 | 74 | |
| 75 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 75 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 76 | 76 | $data = $event->getData(); |
| 77 | 77 | $form = $event->getForm(); |
| 78 | 78 | $this->manageTags($data, $form); |
| 79 | 79 | }); |
| 80 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 80 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 81 | 81 | $form = $event->getForm(); |
| 82 | 82 | $data = $form->getData(); |
| 83 | 83 | $this->manageTags($data, $form); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $form->add('tags', 'tags', [ |
| 93 | 93 | 'required' => false, |
| 94 | 94 | 'multiple' => true, |
| 95 | - 'query_builder' => function (TagRepository $er) use ($data) { |
|
| 95 | + 'query_builder' => function(TagRepository $er) use ($data) { |
|
| 96 | 96 | $qb = $er->filterByBlog($data->getBlog())->getInstance(); |
| 97 | 97 | $er->clearInstance(); |
| 98 | 98 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if (!$form->getData()->getTemplate()) { |
| 137 | 137 | if ($articleTemplateRepo->filterByBlog($blog_id)->getCount('parent')->run('getSingleScalarResult') > 1) { |
| 138 | - $articleTemplates = function (ArticleTemplateRepository $repo) use ($blog_id) { |
|
| 138 | + $articleTemplates = function(ArticleTemplateRepository $repo) use ($blog_id) { |
|
| 139 | 139 | return $repo->filterByBlog($blog_id)->getInstance(); |
| 140 | 140 | }; |
| 141 | 141 | $form->add('template', null, [ |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | 'allow_add' => true, |
| 30 | 30 | 'allow_delete' => true, |
| 31 | 31 | 'by_reference' => false, |
| 32 | - 'prototype' => true,] |
|
| 32 | + 'prototype' => true, ] |
|
| 33 | 33 | ); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | $builder->addEventListener( |
| 42 | 42 | FormEvents::PRE_SET_DATA, |
| 43 | - function ($event) { |
|
| 43 | + function($event) { |
|
| 44 | 44 | $entity = $event->getData(); |
| 45 | 45 | |
| 46 | 46 | if ($entity !== null) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | $builder->addEventListener( |
| 64 | 64 | FormEvents::PRE_SUBMIT, |
| 65 | - function ($event) { |
|
| 65 | + function($event) { |
|
| 66 | 66 | $rawData = $event->getData(); |
| 67 | 67 | if (isset($rawData['children'])) { |
| 68 | 68 | $addChildren = true; |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | |
| 8 | 8 | class VirtualToBusinessPageTransformer |
| 9 | 9 | { |
| 10 | - public function transform(VirtualBusinessPage &$sourceObject) |
|
| 10 | + public function transform(VirtualBusinessPage & $sourceObject) |
|
| 11 | 11 | { |
| 12 | 12 | $bp = new BusinessPage(); |
| 13 | 13 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function fetch($id) |
| 42 | 42 | { |
| 43 | - $id = $this->uniqId + '-' + $id; |
|
| 43 | + $id = $this->uniqId + '-' +$id; |
|
| 44 | 44 | if ($this->contains($id)) { |
| 45 | 45 | return $this->cache->fetch($id); |
| 46 | 46 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function save($id, $data) |
| 60 | 60 | { |
| 61 | - $id = $this->uniqId + '-' + $id; |
|
| 61 | + $id = $this->uniqId + '-' +$id; |
|
| 62 | 62 | if (!$this->apcIsEnabled()) { |
| 63 | 63 | return false; |
| 64 | 64 | } |
@@ -647,7 +647,7 @@ |
||
| 647 | 647 | { |
| 648 | 648 | $widgetIds = []; |
| 649 | 649 | |
| 650 | - $extractWidgetIds = function ($widgetMap) { |
|
| 650 | + $extractWidgetIds = function($widgetMap) { |
|
| 651 | 651 | /* @var $widgetMap WidgetMap */ |
| 652 | 652 | return $widgetMap->getWidgetId(); |
| 653 | 653 | }; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 40 | 40 | { |
| 41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 42 | 42 | $view = $event->getData(); |
| 43 | 43 | $form = $event->getForm(); |
| 44 | 44 | |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | // Si aucune donnée n'est passée au formulaire, la donnée est "null". |
| 49 | 49 | // Ce doit être considéré comme une nouvelle "View" |
| 50 | 50 | if ($this->isNew) { |
| 51 | - $getAllTemplateWithoutMe = function (EntityRepository $tr) { |
|
| 51 | + $getAllTemplateWithoutMe = function(EntityRepository $tr) { |
|
| 52 | 52 | return $tr->getAll()->getInstance(); |
| 53 | 53 | }; |
| 54 | 54 | } else { |
| 55 | - $getAllTemplateWithoutMe = function (EntityRepository $tr) use ($view) { |
|
| 55 | + $getAllTemplateWithoutMe = function(EntityRepository $tr) use ($view) { |
|
| 56 | 56 | return $tr->getAll() |
| 57 | 57 | ->getInstance() |
| 58 | 58 | ->andWhere('template.id != :templateId') |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | // Si aucune donnée n'est passée au formulaire, la donnée est "null". |
| 85 | 85 | // Ce doit être considéré comme une nouvelle "View" |
| 86 | 86 | if (!$view || null === $view->getId()) { |
| 87 | - $getAllPageWithoutMe = function (EntityRepository $bpr) { |
|
| 87 | + $getAllPageWithoutMe = function(EntityRepository $bpr) { |
|
| 88 | 88 | return $bpr->getAll()->getInstance(); |
| 89 | 89 | }; |
| 90 | 90 | } else { |
| 91 | - $getAllPageWithoutMe = function (EntityRepository $bpr) use ($view) { |
|
| 91 | + $getAllPageWithoutMe = function(EntityRepository $bpr) use ($view) { |
|
| 92 | 92 | return $bpr->getAll() |
| 93 | 93 | ->getInstance() |
| 94 | 94 | ->andWhere('page.id != :pageId') |