labelFieldSize
View helper with Icon
Tags
Table of Contents
- $fieldSize : string
- Input field size
- $labelSize : string
- Label size string
- $sizeMap : array<string|int, mixed>
- Size map
- getLabelSize() : string
- Fetch label size classes
- setDisplaySizes() : $this
- Sets label and field sizes
- setDisplaySizesDefault() : $this
- Sets default label and field sizes values, Label: xs: 12, sm: 6, md: 5 Fields: xs: 12, sm: 6, md: 7
- setLabelSize() : $this
- Sets label sizes only
- mapSizes() : bool
- Maps indices to sizeMap
Properties
$fieldSize
Input field size
protected
string
$fieldSize
= ''
$labelSize
Label size string
protected
string
$labelSize
= ''
$sizeMap
Size map
private
array<string|int, mixed>
$sizeMap
= [0 => 'col-', 1 => 'col-sm-', 2 => 'col-md-', 3 => 'col-lg-', 4 => 'col-xl-', 'xs' => 'col-', 'sm' => 'col-sm-', 'md' => 'col-md-', 'lg' => 'col-lg-', 'xl' => 'col-xl-']
Methods
getLabelSize()
Fetch label size classes
public
getLabelSize() : string
Return values
string —setDisplaySizes()
Sets label and field sizes
public
setDisplaySizes(array<string|int, mixed> $label) : $this
Parameters
- $label : array<string|int, mixed>
Return values
$this —setDisplaySizesDefault()
Sets default label and field sizes values, Label: xs: 12, sm: 6, md: 5 Fields: xs: 12, sm: 6, md: 7
public
setDisplaySizesDefault() : $this
Return values
$this —setLabelSize()
Sets label sizes only
public
setLabelSize(array<string|int, mixed> $labelSizes) : $this
Parameters
- $labelSizes : array<string|int, mixed>
Return values
$this —mapSizes()
Maps indices to sizeMap
private
mapSizes(string|int &$size, string|int $index) : bool
Parameters
- $size : string|int
- $index : string|int