@@ -129,45 +129,45 @@ discard block |
||
129 | 129 | if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getfaq')) { |
130 | 130 | $formMapper->add('faq', ModelAutocompleteType::class, [ |
131 | 131 | 'required' => false, |
132 | - 'multiple' => true, |
|
133 | - 'class' => Faq::class, |
|
134 | - 'property' => 'question', // or any field in your media entity |
|
135 | - 'label' => 'admin.page.faq.label', |
|
136 | - 'btn_add' => true, |
|
137 | - 'to_string_callback' => function ($entity, $property) { |
|
138 | - return $entity->getQuestion(); |
|
139 | - }, |
|
140 | - ]); |
|
132 | + 'multiple' => true, |
|
133 | + 'class' => Faq::class, |
|
134 | + 'property' => 'question', // or any field in your media entity |
|
135 | + 'label' => 'admin.page.faq.label', |
|
136 | + 'btn_add' => true, |
|
137 | + 'to_string_callback' => function ($entity, $property) { |
|
138 | + return $entity->getQuestion(); |
|
139 | + }, |
|
140 | + ]); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | //var_dump($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page')); exit; |
144 | 144 | if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getrelatedPages')) { |
145 | 145 | $formMapper->add('relatedPages', ModelAutocompleteType::class, [ |
146 | 146 | 'required' => false, |
147 | - 'multiple' => true, |
|
148 | - 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), |
|
149 | - 'property' => 'title', // or any field in your media entity |
|
150 | - 'label' => 'admin.page.relatedPage.label', |
|
151 | - 'btn_add' => false, |
|
152 | - 'to_string_callback' => function ($entity) { //, $property) { |
|
153 | - return $entity->getTitle(); |
|
154 | - }, |
|
155 | - ]); |
|
147 | + 'multiple' => true, |
|
148 | + 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), |
|
149 | + 'property' => 'title', // or any field in your media entity |
|
150 | + 'label' => 'admin.page.relatedPage.label', |
|
151 | + 'btn_add' => false, |
|
152 | + 'to_string_callback' => function ($entity) { //, $property) { |
|
153 | + return $entity->getTitle(); |
|
154 | + }, |
|
155 | + ]); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getimages')) { |
159 | 159 | $formMapper->add('images', ModelAutocompleteType::class, [ |
160 | 160 | 'required' => false, |
161 | - 'multiple' => true, |
|
162 | - 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_media'), |
|
163 | - 'property' => 'media', |
|
164 | - 'label' => 'admin.page.images.label', |
|
165 | - 'btn_add' => true, |
|
166 | - 'to_string_callback' => function ($entity, $property) { |
|
167 | - return $entity->getName(); |
|
168 | - //'<img src="'.$this->getConfigurationPool()->getContainer()->getParameter('img_dir').'/'.$entity->getImage().'" style="max-width:200px; max-height: 200px;">'; |
|
169 | - }, |
|
170 | - ]); |
|
161 | + 'multiple' => true, |
|
162 | + 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_media'), |
|
163 | + 'property' => 'media', |
|
164 | + 'label' => 'admin.page.images.label', |
|
165 | + 'btn_add' => true, |
|
166 | + 'to_string_callback' => function ($entity, $property) { |
|
167 | + return $entity->getName(); |
|
168 | + //'<img src="'.$this->getConfigurationPool()->getContainer()->getParameter('img_dir').'/'.$entity->getImage().'" style="max-width:200px; max-height: 200px;">'; |
|
169 | + }, |
|
170 | + ]); |
|
171 | 171 | } |
172 | 172 | $formMapper->end(); |
173 | 173 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | 'choices' => [ |
179 | 179 | 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow', |
180 | 180 | ], |
181 | - 'label' => 'admin.page.metaRobots.label', |
|
181 | + 'label' => 'admin.page.metaRobots.label', |
|
182 | 182 | 'required' => false, |
183 | 183 | ]); |
184 | 184 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'dp_calendar_weeks' => false, |
193 | 193 | 'dp_view_mode' => 'days', |
194 | 194 | 'dp_min_view_mode' => 'days', |
195 | - 'label' => 'admin.page.createdAt.label', |
|
195 | + 'label' => 'admin.page.createdAt.label', |
|
196 | 196 | ]); |
197 | 197 | $formMapper->add('updatedAt', DateTimePickerType::class, [ |
198 | 198 | //'date_format' => 'd MMMM y H:mm', |
@@ -204,21 +204,21 @@ discard block |
||
204 | 204 | 'dp_calendar_weeks' => false, |
205 | 205 | 'dp_view_mode' => 'days', |
206 | 206 | 'dp_min_view_mode' => 'days', |
207 | - 'label' => 'admin.page.updatedAt.label', |
|
207 | + 'label' => 'admin.page.updatedAt.label', |
|
208 | 208 | ]); |
209 | 209 | |
210 | 210 | if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getauthor')) { |
211 | 211 | $formMapper->add('author', EntityType::class, [ |
212 | - 'label' => 'admin.page.author.label', |
|
213 | - 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur', |
|
214 | - 'required' => false, |
|
212 | + 'label' => 'admin.page.author.label', |
|
213 | + 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur', |
|
214 | + 'required' => false, |
|
215 | 215 | ]); |
216 | 216 | } |
217 | 217 | |
218 | 218 | if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'gettemplate')) { |
219 | 219 | $formMapper->add('template', null, [ |
220 | - 'label' => 'admin.page.template.label', |
|
221 | - 'required' => false, |
|
220 | + 'label' => 'admin.page.template.label', |
|
221 | + 'required' => false, |
|
222 | 222 | ]); |
223 | 223 | } |
224 | 224 |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | 'required' => false, |
132 | 132 | 'multiple' => true, |
133 | 133 | 'class' => Faq::class, |
134 | - 'property' => 'question', // or any field in your media entity |
|
134 | + 'property' => 'question', // or any field in your media entity |
|
135 | 135 | 'label' => 'admin.page.faq.label', |
136 | 136 | 'btn_add' => true, |
137 | - 'to_string_callback' => function ($entity, $property) { |
|
137 | + 'to_string_callback' => function($entity, $property) { |
|
138 | 138 | return $entity->getQuestion(); |
139 | 139 | }, |
140 | 140 | ]); |
@@ -146,10 +146,10 @@ discard block |
||
146 | 146 | 'required' => false, |
147 | 147 | 'multiple' => true, |
148 | 148 | 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), |
149 | - 'property' => 'title', // or any field in your media entity |
|
149 | + 'property' => 'title', // or any field in your media entity |
|
150 | 150 | 'label' => 'admin.page.relatedPage.label', |
151 | 151 | 'btn_add' => false, |
152 | - 'to_string_callback' => function ($entity) { //, $property) { |
|
152 | + 'to_string_callback' => function($entity) { //, $property) { |
|
153 | 153 | return $entity->getTitle(); |
154 | 154 | }, |
155 | 155 | ]); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | 'property' => 'media', |
164 | 164 | 'label' => 'admin.page.images.label', |
165 | 165 | 'btn_add' => true, |
166 | - 'to_string_callback' => function ($entity, $property) { |
|
166 | + 'to_string_callback' => function($entity, $property) { |
|
167 | 167 | return $entity->getName(); |
168 | 168 | //'<img src="'.$this->getConfigurationPool()->getContainer()->getParameter('img_dir').'/'.$entity->getImage().'" style="max-width:200px; max-height: 200px;">'; |
169 | 169 | }, |