@@ -1,21 +1,21 @@ |
||
1 | 1 | <div class="ecommerce-sidebar-categorys"> |
2 | 2 | <?php |
3 | - if (empty($category)) { |
|
4 | - $category = []; |
|
5 | - } |
|
6 | - $tree = new Ui\Tree(); |
|
7 | - $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) { |
|
8 | - if ($category && $category->id == $categoryItem->id) { |
|
9 | - $class = 'active'; |
|
10 | - } else { |
|
11 | - $class = ''; |
|
12 | - } |
|
13 | - return [ |
|
14 | - 'attributes' => [ |
|
15 | - 'class' => $class, |
|
16 | - ], |
|
17 | - 'text' => "<a {$class} href = '/ecommerce/itemList/{$categoryItem->id}'>{$categoryItem->name}</a>" |
|
18 | - ]; |
|
19 | - }); |
|
20 | - ?> |
|
3 | + if (empty($category)) { |
|
4 | + $category = []; |
|
5 | + } |
|
6 | + $tree = new Ui\Tree(); |
|
7 | + $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) { |
|
8 | + if ($category && $category->id == $categoryItem->id) { |
|
9 | + $class = 'active'; |
|
10 | + } else { |
|
11 | + $class = ''; |
|
12 | + } |
|
13 | + return [ |
|
14 | + 'attributes' => [ |
|
15 | + 'class' => $class, |
|
16 | + ], |
|
17 | + 'text' => "<a {$class} href = '/ecommerce/itemList/{$categoryItem->id}'>{$categoryItem->name}</a>" |
|
18 | + ]; |
|
19 | + }); |
|
20 | + ?> |
|
21 | 21 | </div> |
22 | 22 | \ No newline at end of file |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | $count += count($items); |
33 | 33 | foreach ($items as $objectChild) { |
34 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
34 | + $count += static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
35 | 35 | } |
36 | 36 | ?> |
37 | 37 | </ul> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | echo \Html::el('li', $attributes, $item, true); |
64 | 64 | echo '<ul>'; |
65 | 65 | } |
66 | - $count+=static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc); |
|
66 | + $count += static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | if ($isset) { |