FlatCheckboxInput
extends CheckboxInput
in package
FinalYes
`CheckboxInput` with a flat `getControl()` + `getLabel()` structure.
The original CheckboxInput::getControl() returns
<label class="form-check"><input ...><label ...>Text</label></label>. This class splits the
wrapper into two methods: getControl() returns <input class="form-check-input" ...> and
getLabel() returns <label class="form-check-label" for="...">Text</label>.
It works in both contexts: the automatic BootstrapRenderer (renderLabel + renderControl)
and manual Latte ({input name:} + {label name /}).
Table of Contents
Constants
- MANAGED_ATTRIBUTES : mixed = ['type', 'name', 'id', 'checked', 'value', 'dis...
- Attributes that `makeCheckbox()` drives from the control state; the prototype does not overwrite them.
Methods
- getControl() : Html
- getLabel() : Html|string|null
- classList() : array<int, string>
Constants
MANAGED_ATTRIBUTES
Attributes that `makeCheckbox()` drives from the control state; the prototype does not overwrite them.
private
mixed
MANAGED_ATTRIBUTES
= ['type', 'name', 'id', 'checked', 'value', 'disabled', 'required', 'data-nette-rules']
Methods
getControl()
public
getControl() : Html
Return values
HtmlgetLabel()
public
getLabel([string|Stringable|null $caption = null ]) : Html|string|null
Parameters
- $caption : string|Stringable|null = null
Return values
Html|string|nullclassList()
private
static classList(mixed $class) : array<int, string>
Parameters
- $class : mixed