Nette\Forms\Controls\CheckboxList#getControl() has some strange
: at the end of its attribute names
but I can not find a mention anywhere about what it does – neither in docs
nor in the code. Can someone explain it to me, please? Thanks.
'checked?' => $this->value
Last edited by dakur (2020-03-31 11:10)
- Member | 275
These modifiers are processed in https://github.com/…/Helpers.php#L207
It looks like merging default values of attributes with user-supplied ones.
EDIT: I am sorry, this post was initially written in Czech, b/c I overlooked we are in the English part of the forum.
Last edited by nightfish (2020-03-31 12:04)
- Nette Blogger | 1011
Such attributes are dynamic, i.e. their value varies for each input in the
list. The difference is that
? expects a list of input
values for which the attribute is
expects an array of
input value => attribute value pairs.
Perhaps the test can explain it better than me :)