Documentation

labelFieldSize

View helper with Icon

Table of Contents

$labelSize Label size string string
$fieldSize Input field size string
$sizeMap Size map array
getLabelSize() Fetch label size classes string
getFieldSize() Fetch field size classes string
setDisplaySizesDefault() Sets default label and field sizes values, Label: xs: 12, sm: 6, md: 5 Fields: xs: 12, sm: 6, md: 7 $this
setDisplaySizes() Sets label and field sizes $this
setLabelSize() Sets label sizes only $this
setFieldSize() Sets field sizes only $this
mapSizes() Maps indices to sizeMap bool

Properties

$sizeMap

Size map

private array $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

getFieldSize()

Fetch field size classes

public getFieldSize( ) : string
Return values
string

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

setDisplaySizes()

Sets label and field sizes

public setDisplaySizes( $label : array , $field : array ) : $this
Parameters
$label : array
$field : array
Return values
$this

setLabelSize()

Sets label sizes only

public setLabelSize( $labelSizes : array ) : $this
Parameters
$labelSizes : array
Return values
$this

setFieldSize()

Sets field sizes only

public setFieldSize( $fieldSizes : array ) : $this
Parameters
$fieldSizes : array
Return values
$this

mapSizes()

Maps indices to sizeMap

private mapSizes( &$size : string|int , $index : string|int ) : bool
Parameters
$size : string|int
$index : string|int
Return values
bool

Search results