1 | <?php |
||
12 | class Tree extends Extension implements Initializable, Renderable |
||
13 | { |
||
14 | use HtmlAttributes, \SleepingOwl\Admin\Traits\Renderable; |
||
15 | |||
16 | /** |
||
17 | * @var bool |
||
18 | */ |
||
19 | protected $controlActive = true; |
||
20 | |||
21 | /** |
||
22 | * @var string|\Illuminate\View\View |
||
23 | */ |
||
24 | protected $view = 'display.columns'; |
||
25 | |||
26 | /** |
||
27 | * @var Control |
||
28 | */ |
||
29 | protected $controlColumn; |
||
30 | |||
31 | public function __construct() |
||
37 | |||
38 | /** |
||
39 | * @param ColumnInterface $controlColumn |
||
40 | * |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function setControlColumn(ColumnInterface $controlColumn) |
||
49 | |||
50 | /** |
||
51 | * @return Control |
||
52 | */ |
||
53 | public function getControlColumn() |
||
57 | |||
58 | /** |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function isControlActive() |
||
65 | |||
66 | /** |
||
67 | * @return $this |
||
68 | */ |
||
69 | public function enableControls() |
||
75 | |||
76 | /** |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function disableControls() |
||
85 | |||
86 | /** |
||
87 | * @return Collection|\SleepingOwl\Admin\Contracts\ColumnInterface[] |
||
88 | */ |
||
89 | public function all() |
||
93 | |||
94 | /** |
||
95 | * @return Collection|\SleepingOwl\Admin\Contracts\ColumnInterface[] |
||
96 | */ |
||
97 | public function allWithControl() |
||
107 | |||
108 | /** |
||
109 | * @param ColumnInterface $column |
||
110 | * |
||
111 | * @return $this |
||
112 | */ |
||
113 | public function push(ColumnInterface $column) |
||
119 | |||
120 | /** |
||
121 | * Get the instance as an array. |
||
122 | * |
||
123 | * @return array |
||
124 | */ |
||
125 | public function toArray() |
||
132 | |||
133 | public function initialize() |
||
141 | } |
||
142 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: