@@ -23,17 +23,17 @@ |
||
| 23 | 23 | ?> |
| 24 | 24 | <ul class="treeview" data-col='tree_path'> |
| 25 | 25 | <?php |
| 26 | - if (is_string($objectRoot)) { |
|
| 27 | - $items = $objectRoot::getList(['where' => ['parent_id', 0]]); |
|
| 28 | - } else { |
|
| 29 | - $class = get_class($objectRoot); |
|
| 30 | - $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()], 'order' => $order]); |
|
| 31 | - } |
|
| 32 | - $count += count($items); |
|
| 33 | - foreach ($items as $objectChild) { |
|
| 34 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
| 35 | - } |
|
| 36 | - ?> |
|
| 26 | + if (is_string($objectRoot)) { |
|
| 27 | + $items = $objectRoot::getList(['where' => ['parent_id', 0]]); |
|
| 28 | + } else { |
|
| 29 | + $class = get_class($objectRoot); |
|
| 30 | + $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()], 'order' => $order]); |
|
| 31 | + } |
|
| 32 | + $count += count($items); |
|
| 33 | + foreach ($items as $objectChild) { |
|
| 34 | + $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
| 35 | + } |
|
| 36 | + ?> |
|
| 37 | 37 | </ul> |
| 38 | 38 | <?php |
| 39 | 39 | return $count; |
@@ -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, $order); |
|
| 34 | + $count += static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order); |
|
| 35 | 35 | } |
| 36 | 36 | ?> |
| 37 | 37 | </ul> |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $item = $item['text']; |
| 53 | 53 | } |
| 54 | 54 | if (!isset($attributes['id'])) { |
| 55 | - $attributes['id'] = str_replace('\\', '_', get_class($object)) . "-{$object->pk()}"; |
|
| 55 | + $attributes['id'] = str_replace('\\', '_', get_class($object))."-{$object->pk()}"; |
|
| 56 | 56 | } |
| 57 | 57 | if (!$maxDeep || $deep < $maxDeep) { |
| 58 | 58 | $items = $class::getList(['where' => ['parent_id', $object->pk()], 'order' => $order]); |
@@ -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, $order); |
|
| 66 | + $count += static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc, $order); |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | if ($isset) { |