@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $ids = [$tree->getViewId()]; |
51 | 51 | |
52 | - $getChildrenIds = function (ViewReference $tree) use (&$getChildrenIds, $ids) { |
|
52 | + $getChildrenIds = function(ViewReference $tree) use (&$getChildrenIds, $ids) { |
|
53 | 53 | foreach ($tree->getChildren() as $child) { |
54 | 54 | $ids[] = $child->getViewId(); |
55 | 55 | $ids = array_merge($ids, $getChildrenIds($child)); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $pageHelper = $this->get('victoire_page.page_helper'); |
69 | 69 | $entityManager = $this->getDoctrine()->getManager(); |
70 | 70 | |
71 | - $getBusinessPages = function (ViewReference $tree) use (&$getBusinessPages, $pageHelper, $entityManager) { |
|
71 | + $getBusinessPages = function(ViewReference $tree) use (&$getBusinessPages, $pageHelper, $entityManager) { |
|
72 | 72 | $businessPages = []; |
73 | 73 | foreach ($tree->getChildren() as $child) { |
74 | 74 | if ($child instanceof BusinessPageReference |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ->getQuery() |
64 | 64 | ->getResult(); |
65 | 65 | $templates = []; |
66 | - $recursiveGetTemplates = function ($template) use (&$recursiveGetTemplates, &$templates) { |
|
66 | + $recursiveGetTemplates = function($template) use (&$recursiveGetTemplates, &$templates) { |
|
67 | 67 | array_push($templates, $template); |
68 | 68 | foreach ($template->getInheritors() as $template) { |
69 | 69 | if ($template instanceof Template) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | foreach ($oldWidgetMaps as $slot => $oldWidgetMap) { |
98 | 98 | $widgetMaps = []; |
99 | 99 | var_dump($oldWidgetMap); |
100 | - usort($oldWidgetMap, function ($a, $b) { |
|
100 | + usort($oldWidgetMap, function($a, $b) { |
|
101 | 101 | if ($b['position'] - $a['position'] == 0) { |
102 | 102 | return 1; |
103 | 103 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | ]; |
57 | 57 | |
58 | 58 | for ($i = 1; $i <= 1000; $i++) { |
59 | - $buildSortedWidget = function ($builtWidgetMap) use (&$order, &$buildSortedWidget, $view) { |
|
59 | + $buildSortedWidget = function($builtWidgetMap) use (&$order, &$buildSortedWidget, $view) { |
|
60 | 60 | |
61 | 61 | $sortedWidget['widgetMap'] = $builtWidgetMap['content'][array_rand($builtWidgetMap['content'])]; |
62 | 62 | $availablePositions = []; |
@@ -236,6 +236,7 @@ |
||
236 | 236 | * @param string $namespace the namespace |
237 | 237 | * @param string $formMode the form mode |
238 | 238 | * @param int $position |
239 | + * @param string $slotId |
|
239 | 240 | * |
240 | 241 | * @throws \Exception |
241 | 242 | * |
@@ -369,7 +369,7 @@ |
||
369 | 369 | /** |
370 | 370 | * Add widget. |
371 | 371 | * |
372 | - * @param Widget $widgetMap |
|
372 | + * @param WidgetMap $widgetMap |
|
373 | 373 | */ |
374 | 374 | public function addWidgetMap(WidgetMap $widgetMap) |
375 | 375 | { |
@@ -112,6 +112,9 @@ |
||
112 | 112 | return $this->id; |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @param null|integer $id |
|
117 | + */ |
|
115 | 118 | public function setId($id) |
116 | 119 | { |
117 | 120 | $this->id = $id; |
@@ -369,7 +369,7 @@ |
||
369 | 369 | /** |
370 | 370 | * Add widget. |
371 | 371 | * |
372 | - * @param Widget $widgetMap |
|
372 | + * @param WidgetMap $widgetMap |
|
373 | 373 | */ |
374 | 374 | public function addWidgetMap(WidgetMap $widgetMap) |
375 | 375 | { |
@@ -106,6 +106,10 @@ |
||
106 | 106 | * depending of the children parents and positions |
107 | 107 | * @param WidgetMap $currentWidgetMap |
108 | 108 | */ |
109 | + |
|
110 | + /** |
|
111 | + * @param View $view |
|
112 | + */ |
|
109 | 113 | protected function orderizeWidgetMap($currentWidgetMap, $builtWidgetMap, $slot, $widgetMaps, $view){ |
110 | 114 | $children = $currentWidgetMap->getChildren($view); |
111 | 115 | foreach ($children as $child) { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | /** |
22 | 22 | * Constructor. |
23 | 23 | * |
24 | - * @param SecurityContext $authorizationChecker |
|
24 | + * @param AuthorizationChecker $authorizationChecker |
|
25 | 25 | * @param TwigEngine $twig |
26 | 26 | * @param bool $debug The debug variable environment |
27 | 27 | * @param TemplateMapper $templating The victoire templating |