www/engine/System/Classes/Modules/Entitizer/Utils/Listview.php 1 location
|
@@ 87-94 (lines=8) @@
|
| 84 |
|
|
| 85 |
|
$items = ['list' => [], 'total' => 0]; |
| 86 |
|
|
| 87 |
|
while (null !== ($data = DB::last()->row())) { |
| 88 |
|
|
| 89 |
|
$entity = Entitizer::create(static::$table, $data); |
| 90 |
|
|
| 91 |
|
$items['list'][$entity->id] = ['entity' => $entity]; |
| 92 |
|
|
| 93 |
|
if (null !== $parent_id) $items['list'][$entity->id]['children'] = intval($data['children']); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
# Count total |
| 97 |
|
|
www/engine/System/Classes/Modules/Entitizer/Utils/Treeview.php 1 location
|
@@ 73-80 (lines=8) @@
|
| 70 |
|
|
| 71 |
|
$items = [$parent_id => ['children' => []]]; |
| 72 |
|
|
| 73 |
|
while (null !== ($data = DB::last()->row())) { |
| 74 |
|
|
| 75 |
|
$entity = Entitizer::create(static::$table, $data); |
| 76 |
|
|
| 77 |
|
$items[$entity->id] = ['entity' => $entity, 'children' => []]; |
| 78 |
|
|
| 79 |
|
$items[intval($data['parent_id'])]['children'][] = $entity->id; |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
# ------------------------ |
| 83 |
|
|