@@ -142,15 +142,15 @@ discard block |
||
| 142 | 142 | if (method_exists($this->getContainer()->getParameter('app.entity_page'), 'getfaq')) { |
| 143 | 143 | $formMapper->add('faq', ModelAutocompleteType::class, [ |
| 144 | 144 | 'required' => false, |
| 145 | - 'multiple' => true, |
|
| 146 | - 'class' => $this->getContainer()->getParameter('app.entity_faq'), |
|
| 147 | - 'property' => 'question', // or any field in your media entity |
|
| 148 | - 'label' => 'admin.page.faq.label', |
|
| 149 | - 'btn_add' => true, |
|
| 150 | - 'to_string_callback' => function ($entity) { |
|
| 151 | - return $entity->getQuestion(); |
|
| 152 | - }, |
|
| 153 | - ]); |
|
| 145 | + 'multiple' => true, |
|
| 146 | + 'class' => $this->getContainer()->getParameter('app.entity_faq'), |
|
| 147 | + 'property' => 'question', // or any field in your media entity |
|
| 148 | + 'label' => 'admin.page.faq.label', |
|
| 149 | + 'btn_add' => true, |
|
| 150 | + 'to_string_callback' => function ($entity) { |
|
| 151 | + return $entity->getQuestion(); |
|
| 152 | + }, |
|
| 153 | + ]); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | //var_dump($this->getContainer()->getParameter('app.entity_page')); exit; |
@@ -160,14 +160,14 @@ discard block |
||
| 160 | 160 | ModelAutocompleteType::class, |
| 161 | 161 | [ |
| 162 | 162 | 'required' => false, |
| 163 | - 'multiple' => true, |
|
| 164 | - 'class' => $this->getContainer()->getParameter('app.entity_page'), |
|
| 165 | - 'property' => 'title', // or any field in your media entity |
|
| 166 | - 'label' => 'admin.page.relatedPage.label', |
|
| 167 | - 'btn_add' => false, |
|
| 168 | - 'to_string_callback' => function ($entity) { |
|
| 169 | - return $entity->getTitle(); |
|
| 170 | - }, |
|
| 163 | + 'multiple' => true, |
|
| 164 | + 'class' => $this->getContainer()->getParameter('app.entity_page'), |
|
| 165 | + 'property' => 'title', // or any field in your media entity |
|
| 166 | + 'label' => 'admin.page.relatedPage.label', |
|
| 167 | + 'btn_add' => false, |
|
| 168 | + 'to_string_callback' => function ($entity) { |
|
| 169 | + return $entity->getTitle(); |
|
| 170 | + }, |
|
| 171 | 171 | ] |
| 172 | 172 | ); |
| 173 | 173 | } |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | 'choices' => [ |
| 209 | 209 | 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow', |
| 210 | 210 | ], |
| 211 | - 'label' => 'admin.page.metaRobots.label', |
|
| 211 | + 'label' => 'admin.page.metaRobots.label', |
|
| 212 | 212 | 'required' => false, |
| 213 | 213 | ]); |
| 214 | 214 | } |
@@ -222,21 +222,21 @@ discard block |
||
| 222 | 222 | 'dp_calendar_weeks' => false, |
| 223 | 223 | 'dp_view_mode' => 'days', |
| 224 | 224 | 'dp_min_view_mode' => 'days', |
| 225 | - 'label' => 'admin.page.createdAt.label', |
|
| 225 | + 'label' => 'admin.page.createdAt.label', |
|
| 226 | 226 | ]); |
| 227 | 227 | |
| 228 | 228 | if (method_exists($this->getContainer()->getParameter('app.entity_page'), 'getauthor')) { |
| 229 | 229 | $formMapper->add('author', EntityType::class, [ |
| 230 | - 'label' => 'admin.page.author.label', |
|
| 231 | - 'class' => $this->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur', |
|
| 232 | - 'required' => false, |
|
| 230 | + 'label' => 'admin.page.author.label', |
|
| 231 | + 'class' => $this->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur', |
|
| 232 | + 'required' => false, |
|
| 233 | 233 | ]); |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | if (method_exists($this->getContainer()->getParameter('app.entity_page'), 'gettemplate')) { |
| 237 | 237 | $formMapper->add('template', null, [ |
| 238 | - 'label' => 'admin.page.template.label', |
|
| 239 | - 'required' => false, |
|
| 238 | + 'label' => 'admin.page.template.label', |
|
| 239 | + 'required' => false, |
|
| 240 | 240 | ]); |
| 241 | 241 | } |
| 242 | 242 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | 'choices' => [ |
| 269 | 269 | 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow', |
| 270 | 270 | ], |
| 271 | - 'label' => 'admin.page.metaRobots.label', |
|
| 271 | + 'label' => 'admin.page.metaRobots.label', |
|
| 272 | 272 | ]); |
| 273 | 273 | } |
| 274 | 274 | /* |
@@ -283,9 +283,9 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | if (method_exists($this->getContainer()->getParameter('app.entity_page'), 'getauthor')) { |
| 285 | 285 | $formMapper->add('author', null, [ |
| 286 | - 'label' => 'admin.page.author.label', |
|
| 287 | - 'class' => $this->getContainer()->getParameter('app.entity_user'), |
|
| 288 | - 'required' => false, |
|
| 286 | + 'label' => 'admin.page.author.label', |
|
| 287 | + 'class' => $this->getContainer()->getParameter('app.entity_user'), |
|
| 288 | + 'required' => false, |
|
| 289 | 289 | ]); |
| 290 | 290 | } |
| 291 | 291 | } |
@@ -144,10 +144,10 @@ discard block |
||
| 144 | 144 | 'required' => false, |
| 145 | 145 | 'multiple' => true, |
| 146 | 146 | 'class' => $this->getContainer()->getParameter('app.entity_faq'), |
| 147 | - 'property' => 'question', // or any field in your media entity |
|
| 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 | ]); |
@@ -162,10 +162,10 @@ discard block |
||
| 162 | 162 | 'required' => false, |
| 163 | 163 | 'multiple' => true, |
| 164 | 164 | 'class' => $this->getContainer()->getParameter('app.entity_page'), |
| 165 | - 'property' => 'title', // or any field in your media entity |
|
| 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 | ] |