PHP Class FluidTYPO3\Flux\Form\Field\Select

Inheritance: extends FluidTYPO3\Flux\Form\AbstractMultiValueFormField
Exibir arquivo Open project: fluidtypo3/flux Class Usage Examples

Protected Properties

Property Type Description
$emptyOption boolean | string If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property's value (cast to string) as label.
$items mixed Mixed - string (CSV), Traversable or array of items. Format of key/value pairs is also optional. For single-dim arrays, key becomes option value and each member value becomes label. For multidim/Traversable each member is inspected; if it is a raw value it is used for both value and label, if it is a scalar value the first item is used as value and the second as label.
$renderType string Special rendering type of this component - supports all values normally supported by TCA of the "select" field type.
$showIconTable boolean Displays option icons as table beneath the select.
$translateCsvItems boolean If set to TRUE, Flux will attempt to translate the LLL labels of items provided as CSV values, e.g. items "foo,bar" would try to resolve LLL values for "LLL:EXT:myext/Resources/Private/Languages/locallang.xlf:foo" and "LLL:EXT:myext/Resources/Private/Languages/locallang.xlf:bar" to be used as value labels.

Public Methods

Method Description
buildConfiguration ( ) : array
getEmptyOption ( ) : boolean | string
getItems ( ) : array
getRenderType ( ) : string
getShowIconTable ( ) : boolean
getTranslateCsvItems ( ) : boolean
setEmptyOption ( boolean | string $emptyOption ) : Select
setItems ( array $items ) : Select
setRenderType ( string $renderType ) : void
setShowIconTable ( boolean $showIconTable ) : Select
setTranslateCsvItems ( boolean $translateCsvItems ) : Select

Protected Methods

Method Description
addOptionsFromResults ( TYPO3\CMS\Extbase\Persistence\QueryInterface $query ) : array
getLabelPropertyName ( string $table, string $type ) : string

Method Details

addOptionsFromResults() protected method

protected addOptionsFromResults ( TYPO3\CMS\Extbase\Persistence\QueryInterface $query ) : array
$query TYPO3\CMS\Extbase\Persistence\QueryInterface
return array

buildConfiguration() public method

public buildConfiguration ( ) : array
return array

getEmptyOption() public method

public getEmptyOption ( ) : boolean | string
return boolean | string

getItems() public method

public getItems ( ) : array
return array

getLabelPropertyName() protected method

protected getLabelPropertyName ( string $table, string $type ) : string
$table string
$type string
return string

getRenderType() public method

public getRenderType ( ) : string
return string

getShowIconTable() public method

public getShowIconTable ( ) : boolean
return boolean

getTranslateCsvItems() public method

public getTranslateCsvItems ( ) : boolean
return boolean

setEmptyOption() public method

public setEmptyOption ( boolean | string $emptyOption ) : Select
$emptyOption boolean | string
return Select

setItems() public method

public setItems ( array $items ) : Select
$items array
return Select

setRenderType() public method

public setRenderType ( string $renderType ) : void
$renderType string
return void

setShowIconTable() public method

public setShowIconTable ( boolean $showIconTable ) : Select
$showIconTable boolean
return Select

setTranslateCsvItems() public method

public setTranslateCsvItems ( boolean $translateCsvItems ) : Select
$translateCsvItems boolean
return Select

Property Details

$emptyOption protected_oe property

If not-FALSE, adds one empty option/value pair to the generated selector box and tries to use this property's value (cast to string) as label.
protected bool|string $emptyOption
return boolean | string

$items protected_oe property

Mixed - string (CSV), Traversable or array of items. Format of key/value pairs is also optional. For single-dim arrays, key becomes option value and each member value becomes label. For multidim/Traversable each member is inspected; if it is a raw value it is used for both value and label, if it is a scalar value the first item is used as value and the second as label.
protected mixed $items
return mixed

$renderType protected_oe property

Special rendering type of this component - supports all values normally supported by TCA of the "select" field type.
See also: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#rendertype
protected string $renderType
return string

$showIconTable protected_oe property

Displays option icons as table beneath the select.
See also: https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#showicontable
protected bool $showIconTable
return boolean

$translateCsvItems protected_oe property

If set to TRUE, Flux will attempt to translate the LLL labels of items provided as CSV values, e.g. items "foo,bar" would try to resolve LLL values for "LLL:EXT:myext/Resources/Private/Languages/locallang.xlf:foo" and "LLL:EXT:myext/Resources/Private/Languages/locallang.xlf:bar" to be used as value labels.
protected bool $translateCsvItems
return boolean