@@ -60,8 +60,7 @@ |
||
| 60 | 60 | $real = $request->getRequestUri(); |
| 61 | 61 | |
| 62 | 62 | $expected = 'homepage' == $page->getSlug() ? |
| 63 | - $this->get('piedweb.page_canonical')->generatePathForHomepage() : |
|
| 64 | - $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug()); |
|
| 63 | + $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug()); |
|
| 65 | 64 | |
| 66 | 65 | if ($real != $expected) { |
| 67 | 66 | return [$request->getBasePath().$expected, 301]; |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | if ($this->exists('template')) { |
| 112 | 112 | $formMapper->add('template', null, [ |
| 113 | - 'label' => 'admin.page.template.label', |
|
| 114 | - 'required' => false, |
|
| 113 | + 'label' => 'admin.page.template.label', |
|
| 114 | + 'required' => false, |
|
| 115 | 115 | ]); |
| 116 | 116 | } |
| 117 | 117 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | 'choices' => [ |
| 239 | 239 | 'admin.page.metaRobots.choice.noIndex' => 'noindex', |
| 240 | 240 | ], |
| 241 | - 'label' => 'admin.page.metaRobots.label', |
|
| 241 | + 'label' => 'admin.page.metaRobots.label', |
|
| 242 | 242 | 'required' => false, |
| 243 | 243 | ]); |
| 244 | 244 | } |
@@ -318,9 +318,9 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | if ($this->exists('author')) { |
| 320 | 320 | $formMapper->add('author', null, [ |
| 321 | - 'label' => 'admin.page.author.label', |
|
| 322 | - 'class' => $this->getContainer()->getParameter('app.entity_user'), |
|
| 323 | - 'required' => false, |
|
| 321 | + 'label' => 'admin.page.author.label', |
|
| 322 | + 'class' => $this->getContainer()->getParameter('app.entity_user'), |
|
| 323 | + 'required' => false, |
|
| 324 | 324 | ]); |
| 325 | 325 | } |
| 326 | 326 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | 'property' => 'title', // or any field in your media entity |
| 124 | 124 | 'label' => 'admin.page.relatedPage.label', |
| 125 | 125 | 'btn_add' => false, |
| 126 | - 'to_string_callback' => function ($entity) { |
|
| 126 | + 'to_string_callback' => function($entity) { |
|
| 127 | 127 | return $entity->getTitle(); |
| 128 | 128 | }, |
| 129 | 129 | ]); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | 'label' => 'admin.page.translations.label', |
| 183 | 183 | 'help' => 'admin.page.translations.help', |
| 184 | 184 | 'btn_add' => false, |
| 185 | - 'to_string_callback' => function ($entity) { |
|
| 185 | + 'to_string_callback' => function($entity) { |
|
| 186 | 186 | return $entity->getLocale() |
| 187 | 187 | ? $entity->getLocale().' ('.$entity->getSlug().')' |
| 188 | 188 | : $entity->getSlug(); // switch for getLocale |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | |
| 98 | 98 | $this->eventDispatcher->addListener( |
| 99 | 99 | KernelEvents::TERMINATE, |
| 100 | - function () use ($media) { |
|
| 100 | + function() use ($media) { |
|
| 101 | 101 | $this->generateCache($media); |
| 102 | 102 | } |
| 103 | 103 | ); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $pathWebP = $this->projectDir.'/public/'.$media->getRelativeDir().'/'.$filter.'/'.$media->getSlug().'.webp'; |
| 119 | 119 | $webPConverterOptions = self::$webPConverterOptions; |
| 120 | 120 | |
| 121 | - $this->pool->add(function () use ($pathJpg, $pathWebP, $webPConverterOptions, $filter) { |
|
| 121 | + $this->pool->add(function() use ($pathJpg, $pathWebP, $webPConverterOptions, $filter) { |
|
| 122 | 122 | // took 46s (vs 43s) to add liip generation in async |
| 123 | 123 | //exec($projectDir.'/bin/console liip:imagine:cache:resolve "'.$path.'" --force --filter='.$filter |
| 124 | 124 | //.' >/dev/null 2>&1 &'); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $source = $this->projectDir.$media->getPath(); |
| 133 | 133 | //self::createWebPStatic($destination, $source); |
| 134 | 134 | |
| 135 | - $this->pool->add(function () use ($destination, $source) { |
|
| 135 | + $this->pool->add(function() use ($destination, $source) { |
|
| 136 | 136 | self::createWebPStatic($destination, $source); |
| 137 | 137 | }); |
| 138 | 138 | } |