Documentation

labelFieldSize

View helper with Icon

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2011-2022, Stefan Seehafer

license

http://www.gnu.org/licenses/gpl.txt GPLv3

since
4.3

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

$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
Return values
bool

Search results