Checkbox
Checkbox
Checkbox
- Full name: \Gibbon\Forms\Input\Checkbox
- Parent class: \Gibbon\Forms\Input\Input
Methods
- __construct — Create a checkpox input with a default value of on when checked.
- description — Sets an inline label next to the checkbox input.
- checked — Set a value or array of values that are currently checked.
- checkAll — Set the checked element(s) to include all available options.
- addCheckAllNone — Adds a checkall box to the top of the checkbox list, pass a label in otherwise defaults to All / None.
- inline — Sets multiple checkbox elements to display horizontally.
Inherited from MultipleOptionsTrait
Inherited from Element
Inherited from Input
- setRow
- addValidationOption
- addValidation
- isValidatable
- hasValidation
- getValidationAsJSON
- getValidationOutput
Inherited from InputAttributesTrait
- setName
- getName
- setValue
- getValue
- loadFrom
- loadFromCSV
- setSize
- getSize
- isDisabled
- setDisabled
- getDisabled
- isRequired
- setRequired
- getRequired
- readonly
- setReadonly
- getReadonly
- setTabIndex
- getTabIndex
Inherited from Element
Inherited from BasicAttributesTrait
- setID
- getID
- setTitle
- getTitle
- setClass
- addClass
- removeClass
- getClass
- addData
- getData
- getAttributeString
__construct
Create a checkpox input with a default value of on when checked.
Checkbox::__construct( string $name )
description
Sets an inline label next to the checkbox input.
Checkbox::description( string $value = '' ): self
Returns Self: This method can be chained.
checked
Set a value or array of values that are currently checked.
Checkbox::checked( string $values ): self
Returns Self: This method can be chained.
checkAll
Set the checked element(s) to include all available options.
Checkbox::checkAll( ): self
Returns Self: This method can be chained.
addCheckAllNone
Adds a checkall box to the top of the checkbox list, pass a label in otherwise defaults to All / None.
Checkbox::addCheckAllNone( string $label = '' ): self
Returns Self: This method can be chained.
inline
Sets multiple checkbox elements to display horizontally.
Checkbox::inline( boolean $value = true ): self
Returns Self: This method can be chained.