1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* part-db version 0.1 |
4
|
|
|
* Copyright (C) 2005 Christoph Lechner |
5
|
|
|
* http://www.cl-projects.de/. |
6
|
|
|
* |
7
|
|
|
* part-db version 0.2+ |
8
|
|
|
* Copyright (C) 2009 K. Jacobs and others (see authors.php) |
9
|
|
|
* http://code.google.com/p/part-db/ |
10
|
|
|
* |
11
|
|
|
* Part-DB Version 0.4+ |
12
|
|
|
* Copyright (C) 2016 - 2019 Jan Böhmer |
13
|
|
|
* https://github.com/jbtronics |
14
|
|
|
* |
15
|
|
|
* This program is free software; you can redistribute it and/or |
16
|
|
|
* modify it under the terms of the GNU General Public License |
17
|
|
|
* as published by the Free Software Foundation; either version 2 |
18
|
|
|
* of the License, or (at your option) any later version. |
19
|
|
|
* |
20
|
|
|
* This program is distributed in the hope that it will be useful, |
21
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
22
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23
|
|
|
* GNU General Public License for more details. |
24
|
|
|
* |
25
|
|
|
* You should have received a copy of the GNU General Public License |
26
|
|
|
* along with this program; if not, write to the Free Software |
27
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
28
|
|
|
*/ |
29
|
|
|
|
30
|
|
|
namespace App\Services; |
31
|
|
|
|
32
|
|
|
use App\Helpers\TreeViewNode; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* This Service generates the tree structure for the tools. |
36
|
|
|
* @package App\Services |
37
|
|
|
*/ |
38
|
|
|
class ToolsTreeBuilder |
39
|
|
|
{ |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Generates the tree for the tools menu. |
43
|
|
|
* @return TreeViewNode The array containing all Nodes for the tools menu. |
44
|
|
|
*/ |
45
|
|
|
public function getTree() : array |
46
|
|
|
{ |
47
|
|
|
//TODO: Use proper values |
48
|
|
|
|
49
|
|
|
$nodes = array(); |
50
|
|
|
$nodes[] = new TreeViewNode('Node 1'); |
51
|
|
|
$nodes[] = new TreeViewNode('Node 2'); |
52
|
|
|
|
53
|
|
|
$tree[] = new TreeViewNode('test', 'www.google.de', $nodes); |
|
|
|
|
54
|
|
|
|
55
|
|
|
return $tree; |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|