1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony). |
4
|
|
|
* |
5
|
|
|
* Copyright (C) 2019 Jan Böhmer (https://github.com/jbtronics) |
6
|
|
|
* |
7
|
|
|
* This program is free software; you can redistribute it and/or |
8
|
|
|
* modify it under the terms of the GNU General Public License |
9
|
|
|
* as published by the Free Software Foundation; either version 2 |
10
|
|
|
* of the License, or (at your option) any later version. |
11
|
|
|
* |
12
|
|
|
* This program is distributed in the hope that it will be useful, |
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
* GNU General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU General Public License |
18
|
|
|
* along with this program; if not, write to the Free Software |
19
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
20
|
|
|
*/ |
21
|
|
|
|
22
|
|
|
namespace App\Helpers\Trees; |
23
|
|
|
|
24
|
|
|
class TreeViewNodeState |
25
|
|
|
{ |
26
|
|
|
/** @var bool|null */ |
27
|
|
|
protected $checked = null; |
28
|
|
|
|
29
|
|
|
/** @var bool|null */ |
30
|
|
|
protected $disabled = null; |
31
|
|
|
|
32
|
|
|
/** @var bool|null */ |
33
|
|
|
protected $expanded = null; |
34
|
|
|
|
35
|
|
|
/** @var bool|null */ |
36
|
|
|
protected $selected = null; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @return bool|null |
40
|
|
|
*/ |
41
|
|
|
public function getDisabled(): ?bool |
42
|
|
|
{ |
43
|
|
|
return $this->disabled; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
public function setDisabled(?bool $disabled): void |
47
|
|
|
{ |
48
|
|
|
$this->disabled = $disabled; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return bool|null |
53
|
|
|
*/ |
54
|
|
|
public function getExpanded(): ?bool |
55
|
|
|
{ |
56
|
|
|
return $this->expanded; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function setExpanded(?bool $expanded): void |
60
|
|
|
{ |
61
|
|
|
$this->expanded = $expanded; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return bool|null |
66
|
|
|
*/ |
67
|
|
|
public function getSelected(): ?bool |
68
|
|
|
{ |
69
|
|
|
return $this->selected; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
public function setSelected(?bool $selected): void |
73
|
|
|
{ |
74
|
|
|
$this->selected = $selected; |
75
|
|
|
} |
76
|
|
|
} |
77
|
|
|
|