Class Select
Responsibility: init, pre-dispatch and render <select>
HTML element as roll-out menu for single option select or as options list for multiple selection. Select
field has it's own validator to check if submitted value is presented in configured options by default.
- MvcCore\Ext\Forms\Field implements MvcCore\Ext\Forms\IField uses MvcCore\Ext\Forms\Field\Props, MvcCore\Ext\Forms\Field\Getters, MvcCore\Ext\Forms\Field\Setters, MvcCore\Ext\Forms\Field\Rendering
-
MvcCore\Ext\Forms\Fields\Select implements MvcCore\Ext\Forms\Fields\IVisibleField, MvcCore\Ext\Forms\Fields\ILabel, MvcCore\Ext\Forms\Fields\IMultiple, MvcCore\Ext\Forms\Fields\IOptions, MvcCore\Ext\Forms\Fields\IMinMaxOptions uses MvcCore\Ext\Forms\Field\Props\VisibleField, MvcCore\Ext\Forms\Field\Props\Label, MvcCore\Ext\Forms\Field\Props\AutoComplete, MvcCore\Ext\Forms\Field\Props\Multiple, MvcCore\Ext\Forms\Field\Props\Options, MvcCore\Ext\Forms\Field\Props\MinMaxOptions, MvcCore\Ext\Forms\Field\Props\NullOptionText, MvcCore\Ext\Forms\Field\Props\Size
Direct known subclasses
MvcCore\Ext\Forms\Fields\CountrySelect, MvcCore\Ext\Forms\Fields\LocalizationSelectLocated at ext-form-field-selection/src/MvcCore/Ext/Forms/Fields/Select.php
public
array|string|null
|
|
public
|
|
public
|
|
public
|
#
SetForm(
This INTERNAL method is called from |
public
array
&
|
#
GetValidatorData( array $fieldPropsDefaultValidValues = [] )
Return field specific data for validator. |
public
|
#
PreDispatch( )
This INTERNAL method is called from |
protected
|
#
preDispatchTranslateOptionOptGroup( array & $optionsGroup )
Translate select option item if option item is configured as array for option group. |
public
string
|
#
RenderControl( )
This INTERNAL method is called from |
public
string
|
#
RenderControlOptions( )
This INTERNAL method is called from |
protected
string
|
#
renderControlOptionKeyValue( string|null $value, string & $text, boolean $valueTypeIsArray )
Render select |
protected
string
|
#
renderControlOptionsGroup( array & $optionsGroup, boolean $valueTypeIsArray )
Render |
protected
mixed
|
#
renderControlOptionsAdvanced( string|null $value, mixed $optionData, mixed $valueTypeIsArray )
Render select |
AddValidationError(),
CreateInstance(),
Submit(),
__call(),
__get(),
__set(),
throwNewInvalidArgumentException(),
translateAndFormatValidationError()
|
GetMultiple(),
SetMultiple()
|
AddOptions(),
GetFlattenOptions(),
GetOptions(),
GetTranslateOptions(),
SetOptions(),
SetTranslateOptions()
|
GetAutoComplete(),
SetAutoComplete()
|
GetMultiple(),
SetMultiple()
|
AddOptions(),
GetFlattenOptions(),
GetOptions(),
GetTranslateOptions(),
SetOptions(),
SetTranslateOptions()
|
GetNullOptionText(),
SetNullOptionText(),
preDispatchNullOptionText()
|
GetSize(),
SetSize()
|
string |
VERSION
MvcCore Extension - Form - Field - Selection - version: Comparison by PHP function version_compare(); |
#
'5.0.0'
|
AUTOFOCUS_DUPLICITY_EXCEPTION,
AUTOFOCUS_DUPLICITY_QUIETLY_SET_NEW,
AUTOFOCUS_DUPLICITY_UNSET_OLD_SET_NEW,
LABEL_SIDE_LEFT,
LABEL_SIDE_RIGHT
|
protected
string
|
$type
Possible value: |
#
'select'
|
protected
string|array|null
|
$value
Possible values: a string value, array of strings (for select with |
#
NULL
|
protected
string[]|Closure[]
|
$validators
Validators:
- |
#
['ValueInOptions']
|
protected static
string
|
$templates
Standard field template strings for natural
rendering - |
#
[
'control' => '<select id="{id}" name="{name}"{size}{attrs}>{options}</select>',
'option' => '<option value="{value}"{selected}{class}{attrs}>{text}</option>',
'optionsGroup' => '<optgroup{label}{class}{attrs}>{options}</optgroup>',
]
|
$controlAttrs,
$cssClasses,
$cssSupportingFile,
$declaredProtectedProperties,
$errors,
$form,
$id,
$jsClassName,
$jsSupportingFile,
$name,
$title,
$translate,
$translateTitle,
$view,
$viewScript
|
$label,
$labelAttrs,
$labelSide,
$renderMode,
$translateLabel
|
$autoComplete
|
$multiple
|
$flattenOptions,
$options,
$translateOptions
|
$maxOptions,
$maxOptionsBubbleMessage,
$minOptions,
$minOptionsBubbleMessage,
$requiredBubbleMessage
|
$nullOptionText,
$translateNullOptionText
|
$size
|