@@ -48,8 +48,7 @@ |
||
| 48 | 48 | $real = $request->getRequestUri(); |
| 49 | 49 | |
| 50 | 50 | $expected = 'homepage' == $page->getSlug() ? |
| 51 | - $this->get('piedweb.page_canonical')->generatePathForHomepage() : |
|
| 52 | - $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug()) |
|
| 51 | + $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug()) |
|
| 53 | 52 | ; |
| 54 | 53 | |
| 55 | 54 | if ($real != $expected) { |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | 'property' => 'question', // or any field in your media entity |
| 148 | 148 | 'label' => 'admin.page.faq.label', |
| 149 | 149 | 'btn_add' => true, |
| 150 | - 'to_string_callback' => function ($entity) { |
|
| 150 | + 'to_string_callback' => function($entity) { |
|
| 151 | 151 | return $entity->getQuestion(); |
| 152 | 152 | }, |
| 153 | 153 | ]); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | 'property' => 'title', // or any field in your media entity |
| 166 | 166 | 'label' => 'admin.page.relatedPage.label', |
| 167 | 167 | 'btn_add' => false, |
| 168 | - 'to_string_callback' => function ($entity) { |
|
| 168 | + 'to_string_callback' => function($entity) { |
|
| 169 | 169 | return $entity->getTitle(); |
| 170 | 170 | }, |
| 171 | 171 | ] |
@@ -152,15 +152,15 @@ discard block |
||
| 152 | 152 | if ($this->exists('faq')) { |
| 153 | 153 | $formMapper->add('faq', ModelAutocompleteType::class, [ |
| 154 | 154 | 'required' => false, |
| 155 | - 'multiple' => true, |
|
| 156 | - 'class' => $this->getContainer()->getParameter('app.entity_faq'), |
|
| 157 | - 'property' => 'question', // or any field in your media entity |
|
| 158 | - 'label' => 'admin.page.faq.label', |
|
| 159 | - 'btn_add' => true, |
|
| 160 | - 'to_string_callback' => function ($entity) { |
|
| 161 | - return $entity->getQuestion(); |
|
| 162 | - }, |
|
| 163 | - ]); |
|
| 155 | + 'multiple' => true, |
|
| 156 | + 'class' => $this->getContainer()->getParameter('app.entity_faq'), |
|
| 157 | + 'property' => 'question', // or any field in your media entity |
|
| 158 | + 'label' => 'admin.page.faq.label', |
|
| 159 | + 'btn_add' => true, |
|
| 160 | + 'to_string_callback' => function ($entity) { |
|
| 161 | + return $entity->getQuestion(); |
|
| 162 | + }, |
|
| 163 | + ]); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | //var_dump($this->getContainer()->getParameter('app.entity_page')); exit; |
@@ -170,14 +170,14 @@ discard block |
||
| 170 | 170 | ModelAutocompleteType::class, |
| 171 | 171 | [ |
| 172 | 172 | 'required' => false, |
| 173 | - 'multiple' => true, |
|
| 174 | - 'class' => $this->getContainer()->getParameter('app.entity_page'), |
|
| 175 | - 'property' => 'title', // or any field in your media entity |
|
| 176 | - 'label' => 'admin.page.relatedPage.label', |
|
| 177 | - 'btn_add' => false, |
|
| 178 | - 'to_string_callback' => function ($entity) { |
|
| 179 | - return $entity->getTitle(); |
|
| 180 | - }, |
|
| 173 | + 'multiple' => true, |
|
| 174 | + 'class' => $this->getContainer()->getParameter('app.entity_page'), |
|
| 175 | + 'property' => 'title', // or any field in your media entity |
|
| 176 | + 'label' => 'admin.page.relatedPage.label', |
|
| 177 | + 'btn_add' => false, |
|
| 178 | + 'to_string_callback' => function ($entity) { |
|
| 179 | + return $entity->getTitle(); |
|
| 180 | + }, |
|
| 181 | 181 | ] |
| 182 | 182 | ); |
| 183 | 183 | } |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | 'choices' => [ |
| 219 | 219 | 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow', |
| 220 | 220 | ], |
| 221 | - 'label' => 'admin.page.metaRobots.label', |
|
| 221 | + 'label' => 'admin.page.metaRobots.label', |
|
| 222 | 222 | 'required' => false, |
| 223 | 223 | ]); |
| 224 | 224 | } |
@@ -232,21 +232,21 @@ discard block |
||
| 232 | 232 | 'dp_calendar_weeks' => false, |
| 233 | 233 | 'dp_view_mode' => 'days', |
| 234 | 234 | 'dp_min_view_mode' => 'days', |
| 235 | - 'label' => 'admin.page.createdAt.label', |
|
| 235 | + 'label' => 'admin.page.createdAt.label', |
|
| 236 | 236 | ]); |
| 237 | 237 | |
| 238 | 238 | if ($this->exists('author')) { |
| 239 | 239 | $formMapper->add('author', EntityType::class, [ |
| 240 | - 'label' => 'admin.page.author.label', |
|
| 241 | - 'class' => $this->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur', |
|
| 242 | - 'required' => false, |
|
| 240 | + 'label' => 'admin.page.author.label', |
|
| 241 | + 'class' => $this->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur', |
|
| 242 | + 'required' => false, |
|
| 243 | 243 | ]); |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | if ($this->exists('template')) { |
| 247 | 247 | $formMapper->add('template', null, [ |
| 248 | - 'label' => 'admin.page.template.label', |
|
| 249 | - 'required' => false, |
|
| 248 | + 'label' => 'admin.page.template.label', |
|
| 249 | + 'required' => false, |
|
| 250 | 250 | ]); |
| 251 | 251 | } |
| 252 | 252 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | 'choices' => [ |
| 279 | 279 | 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow', |
| 280 | 280 | ], |
| 281 | - 'label' => 'admin.page.metaRobots.label', |
|
| 281 | + 'label' => 'admin.page.metaRobots.label', |
|
| 282 | 282 | ]); |
| 283 | 283 | } |
| 284 | 284 | /* |
@@ -293,9 +293,9 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | if ($this->exists('author')) { |
| 295 | 295 | $formMapper->add('author', null, [ |
| 296 | - 'label' => 'admin.page.author.label', |
|
| 297 | - 'class' => $this->getContainer()->getParameter('app.entity_user'), |
|
| 298 | - 'required' => false, |
|
| 296 | + 'label' => 'admin.page.author.label', |
|
| 297 | + 'class' => $this->getContainer()->getParameter('app.entity_user'), |
|
| 298 | + 'required' => false, |
|
| 299 | 299 | ]); |
| 300 | 300 | } |
| 301 | 301 | } |