@@ -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 | ]); |
@@ -145,10 +145,10 @@ discard block |
||
| 145 | 145 | 'required' => false, |
| 146 | 146 | 'multiple' => true, |
| 147 | 147 | 'class' => $this->getConfigurationPool()->getContainer()->getParameter('app.entity_page'), |
| 148 | - 'property' => 'title', // or any field in your media entity |
|
| 148 | + 'property' => 'title', // or any field in your media entity |
|
| 149 | 149 | 'label' => 'admin.page.relatedPage.label', |
| 150 | 150 | 'btn_add' => false, |
| 151 | - 'to_string_callback' => function ($entity, $property) { |
|
| 151 | + 'to_string_callback' => function($entity, $property) { |
|
| 152 | 152 | return $entity->getTitle(); |
| 153 | 153 | }, |
| 154 | 154 | ]); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | 'property' => 'media', |
| 163 | 163 | 'label' => 'admin.page.images.label', |
| 164 | 164 | 'btn_add' => true, |
| 165 | - 'to_string_callback' => function ($entity, $property) { |
|
| 165 | + 'to_string_callback' => function($entity, $property) { |
|
| 166 | 166 | return $entity->getName(); |
| 167 | 167 | //'<img src="'.$this->getConfigurationPool()->getContainer()->getParameter('img_dir').'/'.$entity->getImage().'" style="max-width:200px; max-height: 200px;">'; |
| 168 | 168 | }, |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | $defaultLocale = $this->container->getParameter('locale'); |
| 56 | 56 | |
| 57 | 57 | $expected = 'homepage' == $page->getSlug() && $defaultLocale == $request->getLocale() ? |
| 58 | - $this->get('router')->generate('piedweb_cms_homepage') : |
|
| 59 | - $this->get('router')->generate('piedweb_cms_page', ['slug' => $page->getRealSlug()]) |
|
| 58 | + $this->get('router')->generate('piedweb_cms_homepage') : $this->get('router')->generate('piedweb_cms_page', ['slug' => $page->getRealSlug()]) |
|
| 60 | 59 | ; |
| 61 | 60 | |
| 62 | 61 | if ($real != $expected) { |