Passed
Push — master ( 01829a...af608e )
by Dev
03:30
created
src/Admin/PageAdmin.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -144,30 +144,30 @@  discard block
 block discarded – undo
144 144
         if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getfaq')) {
145 145
             $formMapper->add('faq', ModelAutocompleteType::class, [
146 146
             'required' => false,
147
-             'multiple' => true,
148
-             'class' => Faq::class,
149
-             'property' => 'question',   // or any field in your media entity
150
-             'label' => 'admin.page.faq.label',
151
-             'btn_add' => true,
152
-             'to_string_callback' => function ($entity, $property) {
153
-                 return $entity->getQuestion();
154
-             },
155
-         ]);
147
+                'multiple' => true,
148
+                'class' => Faq::class,
149
+                'property' => 'question',   // or any field in your media entity
150
+                'label' => 'admin.page.faq.label',
151
+                'btn_add' => true,
152
+                'to_string_callback' => function ($entity, $property) {
153
+                    return $entity->getQuestion();
154
+                },
155
+            ]);
156 156
         }
157 157
 
158 158
         //var_dump($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page')); exit;
159 159
         if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getrelatedPages')) {
160 160
             $formMapper->add('relatedPages', ModelAutocompleteType::class, [
161 161
             'required' => false,
162
-             'multiple' => true,
163
-             'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'),
164
-             'property' => 'title',   // or any field in your media entity
165
-             'label' => 'admin.page.relatedPage.label',
166
-             'btn_add' => false,
167
-             'to_string_callback' => function ($entity) { //, $property) {
168
-                 return $entity->getTitle();
169
-             },
170
-         ]);
162
+                'multiple' => true,
163
+                'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'),
164
+                'property' => 'title',   // or any field in your media entity
165
+                'label' => 'admin.page.relatedPage.label',
166
+                'btn_add' => false,
167
+                'to_string_callback' => function ($entity) { //, $property) {
168
+                    return $entity->getTitle();
169
+                },
170
+            ]);
171 171
         }
172 172
         $formMapper->end();
173 173
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             'choices' => [
204 204
                 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow',
205 205
             ],
206
-             'label' => 'admin.page.metaRobots.label',
206
+                'label' => 'admin.page.metaRobots.label',
207 207
             'required' => false,
208 208
         ]);
209 209
         }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             'dp_calendar_weeks' => false,
218 218
             'dp_view_mode' => 'days',
219 219
             'dp_min_view_mode' => 'days',
220
-             'label' => 'admin.page.createdAt.label',
220
+                'label' => 'admin.page.createdAt.label',
221 221
         ]);
222 222
         $formMapper->add('updatedAt', DateTimePickerType::class, [
223 223
             //'date_format' => 'd MMMM y H:mm',
@@ -229,21 +229,21 @@  discard block
 block discarded – undo
229 229
             'dp_calendar_weeks' => false,
230 230
             'dp_view_mode' => 'days',
231 231
             'dp_min_view_mode' => 'days',
232
-             'label' => 'admin.page.updatedAt.label',
232
+                'label' => 'admin.page.updatedAt.label',
233 233
         ]);
234 234
 
235 235
         if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getauthor')) {
236 236
             $formMapper->add('author', EntityType::class, [
237
-             'label' => 'admin.page.author.label',
238
-             'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur',
239
-             'required' => false,
237
+                'label' => 'admin.page.author.label',
238
+                'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_user'), 'label' => 'Auteur',
239
+                'required' => false,
240 240
         ]);
241 241
         }
242 242
 
243 243
         if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'gettemplate')) {
244 244
             $formMapper->add('template', null, [
245
-             'label' => 'admin.page.template.label',
246
-             'required' => false,
245
+                'label' => 'admin.page.template.label',
246
+                'required' => false,
247 247
             ]);
248 248
         }
249 249
 
@@ -279,22 +279,22 @@  discard block
 block discarded – undo
279 279
             'choices' => [
280 280
                 'admin.page.metaRobots.choice.noIndex' => 'no-index, no-follow',
281 281
             ],
282
-             'label' => 'admin.page.metaRobots.label',
282
+                'label' => 'admin.page.metaRobots.label',
283 283
         ]);
284 284
         }
285 285
         $formMapper->add('createdAt', null, [
286
-             'label' => 'admin.page.createdAt.label',
286
+                'label' => 'admin.page.createdAt.label',
287 287
         ]);
288 288
         $formMapper->add('updatedAt', null, [
289
-             'label' => 'admin.page.updatedAt.label',
289
+                'label' => 'admin.page.updatedAt.label',
290 290
         ]);
291 291
 
292 292
         if (method_exists($this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), 'getauthor')) {
293 293
             $formMapper->add('author', null, [
294
-             'label' => 'admin.page.author.label',
295
-             'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_user'),
296
-             'label' => 'Auteur',
297
-             'required' => false,
294
+                'label' => 'admin.page.author.label',
295
+                'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_user'),
296
+                'label' => 'Auteur',
297
+                'required' => false,
298 298
             ]);
299 299
         }
300 300
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
             'required' => false,
147 147
              'multiple' => true,
148 148
              'class' => Faq::class,
149
-             'property' => 'question',   // or any field in your media entity
149
+             'property' => 'question', // or any field in your media entity
150 150
              'label' => 'admin.page.faq.label',
151 151
              'btn_add' => true,
152
-             'to_string_callback' => function ($entity, $property) {
152
+             'to_string_callback' => function($entity, $property) {
153 153
                  return $entity->getQuestion();
154 154
              },
155 155
          ]);
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
             'required' => false,
162 162
              'multiple' => true,
163 163
              'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'),
164
-             'property' => 'title',   // or any field in your media entity
164
+             'property' => 'title', // or any field in your media entity
165 165
              'label' => 'admin.page.relatedPage.label',
166 166
              'btn_add' => false,
167
-             'to_string_callback' => function ($entity) { //, $property) {
167
+             'to_string_callback' => function($entity) { //, $property) {
168 168
                  return $entity->getTitle();
169 169
              },
170 170
          ]);
Please login to merge, or discard this patch.