1 | <?php |
||
16 | trait FormGroupTrait |
||
17 | { |
||
18 | /** |
||
19 | * Store a reference to the parent form widget. |
||
20 | * |
||
21 | * @var FormInterface |
||
22 | */ |
||
23 | protected $form; |
||
24 | |||
25 | /** |
||
26 | * The group's collection of fields. |
||
27 | * |
||
28 | * @var FormInputInterface[] |
||
29 | */ |
||
30 | private $inputs = []; |
||
31 | |||
32 | /** |
||
33 | * The input callback; called on every input. |
||
34 | * |
||
35 | * Callable signature: `function(FormInputInterface $input)` |
||
36 | * |
||
37 | * @var callable |
||
38 | */ |
||
39 | private $inputCallback; |
||
40 | |||
41 | /** |
||
42 | * Store the builder instance for the current class. |
||
43 | * |
||
44 | * @var FormInputBuilder |
||
45 | */ |
||
46 | protected $formInputBuilder; |
||
47 | |||
48 | /** |
||
49 | * The L10N display mode. |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | private $l10nMode; |
||
54 | |||
55 | /** |
||
56 | * The group's identifier. |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | private $ident; |
||
61 | |||
62 | /** |
||
63 | * The required Acl permissions fetch from form group. |
||
64 | * |
||
65 | * @var string[] $requiredAclPermissions |
||
66 | */ |
||
67 | private $requiredAclPermissions = []; |
||
68 | |||
69 | /** |
||
70 | * One or many CSS classes for tab form group. |
||
71 | * |
||
72 | * @var string |
||
73 | */ |
||
74 | private $tabCssClasses; |
||
75 | |||
76 | /** |
||
77 | * @var boolean |
||
78 | */ |
||
79 | private $isHidden; |
||
80 | |||
81 | /** |
||
82 | * @var array|null |
||
83 | */ |
||
84 | private $conditionalLogic; |
||
85 | |||
86 | /** |
||
87 | * @var array|null |
||
88 | */ |
||
89 | private $rawConditionalLogic; |
||
90 | |||
91 | /** |
||
92 | * @var boolean |
||
93 | */ |
||
94 | private $conditionalLogicUnmet; |
||
95 | |||
96 | /** |
||
97 | * Comparison function used by {@see uasort()}. |
||
98 | * |
||
99 | * @param PrioritizableInterface $a Sortable entity A. |
||
100 | * @param PrioritizableInterface $b Sortable entity B. |
||
101 | * @return integer Sorting value: -1 or 1. |
||
102 | */ |
||
103 | abstract protected function sortItemsByPriority( |
||
107 | |||
108 | /** |
||
109 | * @param FormInputBuilder $builder The builder, to create customized form input objects. |
||
110 | * @return FormGroupInterface Chainable |
||
111 | */ |
||
112 | protected function setFormInputBuilder(FormInputBuilder $builder) |
||
118 | |||
119 | /** |
||
120 | * @param callable $cb The input callback. |
||
121 | * @return FormGroupInterface Chainable |
||
122 | */ |
||
123 | public function setInputCallback(callable $cb) |
||
129 | |||
130 | /** |
||
131 | * @param FormInterface $form The parent form object. |
||
132 | * @return FormGroupInterface Chainable |
||
133 | */ |
||
134 | public function setForm(FormInterface $form) |
||
140 | |||
141 | /** |
||
142 | * @return FormInterface |
||
143 | */ |
||
144 | public function form() |
||
148 | |||
149 | /** |
||
150 | * @param string $mode The l10n mode. |
||
151 | * @return FormGroupInterface Chainable |
||
152 | */ |
||
153 | public function setL10nMode($mode) |
||
159 | |||
160 | /** |
||
161 | * @return string |
||
162 | */ |
||
163 | public function l10nMode() |
||
167 | |||
168 | /** |
||
169 | * @param array $inputs The group inputs. |
||
170 | * @return FormGroupInterface Chainable |
||
171 | */ |
||
172 | public function setInputs(array $inputs) |
||
181 | |||
182 | /** |
||
183 | * @param string $inputIdent The input identifier. |
||
184 | * @param array|FormInputInterface $input The input object or structure. |
||
185 | * @throws InvalidArgumentException If the ident argument is not a string or if the input is not valid. |
||
186 | * @return FormGroupInterface Chainable |
||
187 | */ |
||
188 | public function addInput($inputIdent, $input) |
||
211 | |||
212 | /** |
||
213 | * Form Input generator. |
||
214 | * |
||
215 | * @param callable $inputCallback Optional. Input callback. |
||
216 | * @return FormGroupInterface[]|Generator |
||
217 | */ |
||
218 | public function inputs(callable $inputCallback = null) |
||
236 | |||
237 | /** |
||
238 | * Wether this group contains any inputs. |
||
239 | * |
||
240 | * @return boolean |
||
241 | */ |
||
242 | public function hasInputs() |
||
246 | |||
247 | /** |
||
248 | * Get the number of inputs in this group. |
||
249 | * |
||
250 | * @return integer |
||
251 | */ |
||
252 | public function numInputs() |
||
256 | |||
257 | /** |
||
258 | * Set the identifier of the group. |
||
259 | * |
||
260 | * @param string $ident The group identifier. |
||
261 | * @return self |
||
262 | */ |
||
263 | public function setIdent($ident) |
||
269 | |||
270 | /** |
||
271 | * Retrieve the idenfitier of the group. |
||
272 | * |
||
273 | * @return string |
||
274 | */ |
||
275 | public function ident() |
||
279 | |||
280 | /** |
||
281 | * @param string|\string[] $classes Class or Classes for tab form group. |
||
282 | * @return self |
||
283 | */ |
||
284 | public function setTabCssClasses($classes) |
||
296 | |||
297 | /** |
||
298 | * @return string |
||
299 | */ |
||
300 | public function tabCssClasses() |
||
304 | |||
305 | /** |
||
306 | * @return boolean |
||
307 | */ |
||
308 | public function isHidden() |
||
312 | |||
313 | /** |
||
314 | * @param boolean $isHidden Hidden (TRUE) or shown (FALSE). |
||
315 | * @return self |
||
316 | */ |
||
317 | public function setIsHidden($isHidden) |
||
323 | |||
324 | /** |
||
325 | * @return array|null |
||
326 | */ |
||
327 | public function conditionalLogic() |
||
331 | |||
332 | /** |
||
333 | * @return array|null |
||
334 | */ |
||
335 | public function rawConditionalLogic() |
||
339 | |||
340 | /** |
||
341 | * @param array|null $conditionalLogic ConditionalLogic for FormGroupWidget. |
||
342 | * @return self |
||
343 | */ |
||
344 | public function setConditionalLogic($conditionalLogic) |
||
361 | |||
362 | /** |
||
363 | * @return boolean |
||
364 | */ |
||
365 | public function conditionalLogicUnmet() |
||
369 | |||
370 | /** |
||
371 | * @param boolean $conditionalLogicUnmet ConditionalLogicUnmet for FormGroupTrait. |
||
372 | * @return self |
||
373 | */ |
||
374 | public function setConditionalLogicUnmet($conditionalLogicUnmet) |
||
380 | } |
||
381 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.