Documentation

labelFieldSize

View helper with Icon

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2011-2020, 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
getFieldSize()  : string
Fetch field size classes
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
setFieldSize()  : $this
Sets field sizes only
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

getFieldSize()

Fetch field size classes

public getFieldSize() : string
Tags
deprecated
5.0-dev
Return values
string

getLabelSize()

Fetch label size classes

public getLabelSize() : string
Return values
string

setDisplaySizes()

Sets label and field sizes

public setDisplaySizes(array<string|int, mixed> $label[, array<string|int, mixed> $field = [] ]) : $this
Parameters
$label : array<string|int, mixed>
$field : array<string|int, mixed> = []

(@deprecated 5.0-dev)

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

setFieldSize()

Sets field sizes only

public setFieldSize(array<string|int, mixed> $fieldSizes) : $this
Parameters
$fieldSizes : array<string|int, mixed>
Tags
deprecated
5.0-dev
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