1 | <?php |
||
17 | class MultiAction extends Column |
||
18 | { |
||
19 | |||
20 | use Traits\TButtonTryAddIcon; |
||
21 | use Traits\TButtonIcon; |
||
22 | use Traits\TButtonClass; |
||
23 | use Traits\TButtonTitle; |
||
24 | use Traits\TButtonText; |
||
25 | use Traits\TButtonCaret; |
||
26 | use Traits\TLink; |
||
27 | |||
28 | /** |
||
29 | * @var DataGrid |
||
30 | */ |
||
31 | protected $grid; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $name; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $actions = []; |
||
42 | |||
43 | /** |
||
44 | * @var callable[] |
||
45 | */ |
||
46 | private $rowConditions = []; |
||
47 | |||
48 | |||
49 | /** |
||
50 | * @param DataGrid $grid |
||
51 | */ |
||
52 | public function __construct(DataGrid $grid, $name) |
||
59 | |||
60 | |||
61 | /** |
||
62 | * @return Html |
||
63 | */ |
||
64 | public function renderButton() |
||
93 | |||
94 | |||
95 | /** |
||
96 | * @param string $key |
||
97 | * @param string $name |
||
98 | * @param string $href |
||
99 | * @param array|null $params |
||
100 | * @return static |
||
101 | */ |
||
102 | public function addAction($key, $name, $href = NULL, array $params = NULL) |
||
124 | |||
125 | |||
126 | /** |
||
127 | * @return Action[] |
||
128 | */ |
||
129 | public function getActions() |
||
133 | |||
134 | |||
135 | /** |
||
136 | * @param string $key |
||
137 | * @return Action |
||
138 | */ |
||
139 | public function getAction($key) |
||
149 | |||
150 | |||
151 | /** |
||
152 | * Column can have variables that will be passed to custom template scope |
||
153 | * @return array |
||
154 | */ |
||
155 | public function getTemplateVariables() |
||
161 | |||
162 | |||
163 | /** |
||
164 | * @param string $actionKey |
||
165 | * @param callable $rowCondition |
||
166 | * @return void |
||
167 | */ |
||
168 | public function setRowCondition($actionKey, callable $rowCondition) |
||
172 | |||
173 | |||
174 | /** |
||
175 | * @param string $actionKey |
||
176 | * @param Row $row |
||
177 | * @return bool |
||
178 | */ |
||
179 | public function testRowCondition($actionKey, Row $row) |
||
187 | } |
||
188 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.