@@ -118,9 +118,10 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @param string $slot |
| 120 | 120 | * @param View $view |
| 121 | - * @param Widget $widget |
|
| 121 | + * @param Widget $widgets |
|
| 122 | 122 | * @param BusinessEntity[] $classes |
| 123 | 123 | * @param int $position |
| 124 | + * @param \Victoire\Bundle\WidgetBundle\Model\Widget $activeWidget |
|
| 124 | 125 | * |
| 125 | 126 | * @throws \Exception |
| 126 | 127 | * |
@@ -275,6 +276,7 @@ discard block |
||
| 275 | 276 | * @param string $namespace the namespace |
| 276 | 277 | * @param string $formMode the form mode |
| 277 | 278 | * @param int $position |
| 279 | + * @param string $slotId |
|
| 278 | 280 | * |
| 279 | 281 | * @throws \Exception |
| 280 | 282 | * |
@@ -359,7 +359,7 @@ |
||
| 359 | 359 | /** |
| 360 | 360 | * Set widgets. |
| 361 | 361 | * |
| 362 | - * @param [WidgetMap] $widgetMaps |
|
| 362 | + * @param [WidgetMap] $widgetMap |
|
| 363 | 363 | * |
| 364 | 364 | * @return Widget |
| 365 | 365 | */ |
@@ -10,7 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | use Symfony\Component\PropertyAccess\PropertyAccessor; |
| 13 | -use Victoire\Bundle\CriteriaBundle\Chain\CriteriaChain; |
|
| 14 | 13 | use Victoire\Bundle\CriteriaBundle\Chain\DataSourceChain; |
| 15 | 14 | use Victoire\Bundle\CriteriaBundle\Entity\Criteria; |
| 16 | 15 | use Victoire\Bundle\WidgetMapBundle\Entity\WidgetMap; |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: paulandrieux |
|
| 5 | - * Date: 17/03/2016 |
|
| 6 | - * Time: 17:28 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: paulandrieux |
|
| 5 | + * Date: 17/03/2016 |
|
| 6 | + * Time: 17:28 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | namespace Victoire\Bundle\WidgetBundle\Resolver; |
| 10 | 10 | |
@@ -120,6 +120,9 @@ discard block |
||
| 120 | 120 | return $this->id; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | + /** |
|
| 124 | + * @param null|integer $id |
|
| 125 | + */ |
|
| 123 | 126 | public function setId($id) |
| 124 | 127 | { |
| 125 | 128 | $this->id = $id; |
@@ -224,7 +227,7 @@ discard block |
||
| 224 | 227 | } |
| 225 | 228 | |
| 226 | 229 | /** |
| 227 | - * @param mixed $replaced |
|
| 230 | + * @param WidgetMap $replaced |
|
| 228 | 231 | */ |
| 229 | 232 | public function setReplaced($replaced) |
| 230 | 233 | { |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * @param Widget $widget |
| 20 | 20 | * @param View $view |
| 21 | 21 | * |
| 22 | - * @return WidgetMap|WidgetMapNotFoundException |
|
| 22 | + * @return WidgetMap |
|
| 23 | 23 | */ |
| 24 | 24 | public static function getWidgetMapByWidgetAndView(Widget $widget, View $view) |
| 25 | 25 | { |
@@ -171,8 +171,8 @@ |
||
| 171 | 171 | * @param View $view |
| 172 | 172 | * @param $beforeChild |
| 173 | 173 | * @param $afterChild |
| 174 | - * @param $originalParent |
|
| 175 | - * @param $originalPosition |
|
| 174 | + * @param WidgetMap|null $originalParent |
|
| 175 | + * @param string $originalPosition |
|
| 176 | 176 | */ |
| 177 | 177 | public function moveChildren(View $view, $beforeChild, $afterChild, $originalParent, $originalPosition) |
| 178 | 178 | { |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | public function insert(Widget $widget, View $view, $slotId, $position, $widgetReference) |
| 29 | 29 | { |
| 30 | 30 | $quantum = $this->em->getRepository('VictoireWidgetMapBundle:WidgetMap')->findOneBy([ |
| 31 | - 'view' => $view, |
|
| 32 | - 'slot' => $slotId, |
|
| 33 | - 'position' => $position, |
|
| 34 | - 'parent' => $widgetReference, |
|
| 31 | + 'view' => $view, |
|
| 32 | + 'slot' => $slotId, |
|
| 33 | + 'position' => $position, |
|
| 34 | + 'parent' => $widgetReference, |
|
| 35 | 35 | ]); |
| 36 | 36 | if ($quantum) { |
| 37 | 37 | $widget->setWidgetMap($quantum); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | //we use the PRE_SUBMIT event to set the mode option |
| 77 | 77 | $builder->addEventListener( |
| 78 | 78 | FormEvents::PRE_SUBMIT, |
| 79 | - function (FormEvent $event) use ($options) { |
|
| 79 | + function(FormEvent $event) use ($options) { |
|
| 80 | 80 | //we get the raw data for the widget form |
| 81 | 81 | $rawData = $event->getData(); |
| 82 | 82 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $builder->addEventListener( |
| 105 | 105 | FormEvents::PRE_SET_DATA, |
| 106 | - function (FormEvent $event) use ($options) { |
|
| 106 | + function(FormEvent $event) use ($options) { |
|
| 107 | 107 | $dataSources = $options['dataSources']->getDataSources(); |
| 108 | 108 | $widget = $event->getData(); |
| 109 | 109 | foreach ($dataSources as $alias => $dataSource) { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | ); |
| 119 | 119 | $builder->addEventListener( |
| 120 | 120 | FormEvents::POST_SUBMIT, |
| 121 | - function (FormEvent $event) use ($options) { |
|
| 121 | + function(FormEvent $event) use ($options) { |
|
| 122 | 122 | $widget = $event->getData(); |
| 123 | 123 | /** @var Criteria $criteria */ |
| 124 | 124 | foreach ($widget->getCriterias() as $criteria) { |