@@ -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]; |
@@ -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 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | 'property' => 'title', // or any field in your media entity |
118 | 118 | 'label' => 'admin.page.relatedPage.label', |
119 | 119 | 'btn_add' => false, |
120 | - 'to_string_callback' => function ($entity) { |
|
120 | + 'to_string_callback' => function($entity) { |
|
121 | 121 | return $entity->getTitle(); |
122 | 122 | }, |
123 | 123 | ]); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | 'label' => 'admin.page.translations.label', |
177 | 177 | 'help' => 'admin.page.translations.help', |
178 | 178 | 'btn_add' => false, |
179 | - 'to_string_callback' => function ($entity) { |
|
179 | + 'to_string_callback' => function($entity) { |
|
180 | 180 | return $entity->getLocale() |
181 | 181 | ? $entity->getLocale().' ('.$entity->getSlug().')' |
182 | 182 | : $entity->getSlug(); // switch for getLocale |