@@ -123,9 +123,10 @@ discard block |
||
123 | 123 | * |
124 | 124 | * @param string $slot |
125 | 125 | * @param View $view |
126 | - * @param Widget $widget |
|
126 | + * @param Widget $widgets |
|
127 | 127 | * @param BusinessEntity[] $classes |
128 | 128 | * @param int $position |
129 | + * @param \Victoire\Bundle\WidgetBundle\Model\Widget $activeWidget |
|
129 | 130 | * |
130 | 131 | * @throws \Exception |
131 | 132 | * |
@@ -150,7 +151,6 @@ discard block |
||
150 | 151 | * @param Widget $widget |
151 | 152 | * @param View $view |
152 | 153 | * @param string $businessEntityId |
153 | - * @param string $namespace |
|
154 | 154 | * @param int $position |
155 | 155 | * @param string $slot |
156 | 156 | * |
@@ -181,7 +181,6 @@ discard block |
||
181 | 181 | * @param Widget $widget |
182 | 182 | * @param View $view |
183 | 183 | * @param string $businessEntityId |
184 | - * @param string $namespace |
|
185 | 184 | * @param string $formMode |
186 | 185 | * @param int $position |
187 | 186 | * |
@@ -297,9 +296,9 @@ discard block |
||
297 | 296 | * @param Widget $widget the widget |
298 | 297 | * @param View $view the page |
299 | 298 | * @param string $businessEntityId the entity class |
300 | - * @param string $namespace the namespace |
|
301 | 299 | * @param string $formMode the form mode |
302 | 300 | * @param int $position |
301 | + * @param string $slotId |
|
303 | 302 | * |
304 | 303 | * @throws \Exception |
305 | 304 | * |
@@ -54,7 +54,6 @@ |
||
54 | 54 | * @param Request $request |
55 | 55 | * @param WidgetMapManager $widgetMapManager |
56 | 56 | * @param WidgetMapBuilder $widgetMapBuilder |
57 | - * @param BusinessEntityHelper $cacheReader |
|
58 | 57 | * @param EngineInterface $templating |
59 | 58 | * @param PageHelper $pageHelper |
60 | 59 | * @param array $slots |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use Victoire\Bundle\WidgetBundle\Cache\WidgetCache; |
16 | 16 | use Victoire\Bundle\WidgetBundle\Entity\Widget; |
17 | 17 | use Victoire\Bundle\WidgetBundle\Helper\WidgetHelper; |
18 | -use Victoire\Bundle\WidgetMapBundle\Entity\Slot; |
|
19 | 18 | use Victoire\Bundle\WidgetMapBundle\Helper\WidgetMapHelper; |
20 | 19 | |
21 | 20 | class WidgetRenderer |
@@ -118,7 +118,7 @@ |
||
118 | 118 | ->getQuery() |
119 | 119 | ->getResult(); |
120 | 120 | $templates = []; |
121 | - $recursiveGetTemplates = function ($template) use (&$recursiveGetTemplates, &$templates) { |
|
121 | + $recursiveGetTemplates = function($template) use (&$recursiveGetTemplates, &$templates) { |
|
122 | 122 | array_push($templates, $template); |
123 | 123 | foreach ($template->getInheritors() as $_template) { |
124 | 124 | if ($_template instanceof Template) { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'attr' => [ |
74 | 74 | 'class' => 'add_'.$options['business_entity_id'].'_link picker_entity_select', |
75 | 75 | ], |
76 | - 'query_builder' => function (EntityRepository $er) use ($businessEntity, $locale) { |
|
76 | + 'query_builder' => function(EntityRepository $er) use ($businessEntity, $locale) { |
|
77 | 77 | // Don't display entities that don't have translations in the current locale. |
78 | 78 | if (in_array(Translatable::class, class_uses($businessEntity->getClass()))) { |
79 | 79 | return $er->createQueryBuilder('entity') |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | |
90 | 90 | $builder->get('ressourceId')->addModelTransformer( |
91 | 91 | new CallbackTransformer( |
92 | - function ($idToEntity) use ($entityManager, $businessEntity) { |
|
92 | + function($idToEntity) use ($entityManager, $businessEntity) { |
|
93 | 93 | // transform the array to a string |
94 | 94 | return $entityManager->getRepository($businessEntity->getClass())->findOneById($idToEntity); |
95 | 95 | }, |
96 | - function ($entityToId) { |
|
96 | + function($entityToId) { |
|
97 | 97 | // transform the string back to an array |
98 | 98 | return $entityToId->getId(); |
99 | 99 | } |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | |
150 | 150 | $builder->get('businessEntity')->addModelTransformer( |
151 | 151 | new CallbackTransformer( |
152 | - function ($businessEntity) { |
|
152 | + function($businessEntity) { |
|
153 | 153 | return $businessEntity; |
154 | 154 | }, |
155 | - function ($nameToBusinessEntity) use ($entityManager) { |
|
155 | + function($nameToBusinessEntity) use ($entityManager) { |
|
156 | 156 | return $entityManager->getRepository( |
157 | 157 | 'VictoireBusinessEntityBundle:BusinessEntity' |
158 | 158 | )->findOneByName( |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $businessEntity = $options['businessEntity']; |
28 | 28 | $getMethod = $businessEntity->getGetMethod(); |
29 | 29 | preg_match_all('/{{([a-zA-Z]+)}}/', $getMethod, $matches); |
30 | - $identifiers = array_map(function ($property) { |
|
30 | + $identifiers = array_map(function($property) { |
|
31 | 31 | return $property->getName(); |
32 | 32 | }, |
33 | 33 | $businessEntity->getBusinessIdentifiers()->toArray() |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | //we use the PRE_SUBMIT event to set the mode option |
74 | 74 | $builder->addEventListener( |
75 | 75 | FormEvents::PRE_SUBMIT, |
76 | - function (FormEvent $event) use ($options) { |
|
76 | + function(FormEvent $event) use ($options) { |
|
77 | 77 | //we get the raw data for the widget form |
78 | 78 | $rawData = $event->getData(); |
79 | 79 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | ]); |
118 | 118 | $builder->addEventListener( |
119 | 119 | FormEvents::PRE_SET_DATA, |
120 | - function (FormEvent $event) use ($options) { |
|
120 | + function(FormEvent $event) use ($options) { |
|
121 | 121 | $dataSources = $options['dataSources']->getDataSources(); |
122 | 122 | $widget = $event->getData(); |
123 | 123 | foreach ($dataSources as $alias => $dataSource) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ); |
132 | 132 | $builder->addEventListener( |
133 | 133 | FormEvents::POST_SUBMIT, |
134 | - function (FormEvent $event) { |
|
134 | + function(FormEvent $event) { |
|
135 | 135 | $widget = $event->getData(); |
136 | 136 | /** @var Criteria $criteria */ |
137 | 137 | foreach ($widget->getCriterias() as $criteria) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * filter API to get a list of entities. |
100 | 100 | * |
101 | 101 | * @param APIBusinessEntity $businessEntity |
102 | - * @param array $filters |
|
102 | + * @param array $filter |
|
103 | 103 | * |
104 | 104 | * @return mixed |
105 | 105 | */ |
@@ -123,6 +123,7 @@ discard block |
||
123 | 123 | * Sends a curl request to a given path. |
124 | 124 | * |
125 | 125 | * @param APIEndpoint $endPoint |
126 | + * @param string $getMethod |
|
126 | 127 | * |
127 | 128 | * @return array |
128 | 129 | */ |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $getMethod = $businessEntity->getGetMethod(); |
51 | 51 | preg_match_all('/{{([a-zA-Z]+)}}/', $getMethod, $matches); |
52 | 52 | // build an array with businessIdentifiers properties names |
53 | - $identifiers = array_map(function ($property) { |
|
53 | + $identifiers = array_map(function($property) { |
|
54 | 54 | return $property->getName(); |
55 | 55 | }, |
56 | 56 | $businessEntity->getBusinessIdentifiers()->toArray() |
@@ -14,7 +14,6 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * Replace the code string with the value of the entity attribute. |
16 | 16 | * |
17 | - * @param string $string |
|
18 | 17 | * @param BusinessProperty $businessProperty |
19 | 18 | * @param object $entity |
20 | 19 | * |
@@ -41,7 +40,6 @@ discard block |
||
41 | 40 | /** |
42 | 41 | * Replace the code string with the value of the entity attribute. |
43 | 42 | * |
44 | - * @param string $string |
|
45 | 43 | * @param string $entityProperty |
46 | 44 | * @param string $attributeValue |
47 | 45 | * |