Class RadioGroup
Responsibility: init, pre-dispatch and render <input type="radio">
HTML element as radio buttons menu for single option selection. RadioGroup
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\FieldsGroup
implements
MvcCore\Ext\Forms\Fields\IVisibleField,
MvcCore\Ext\Forms\Fields\ILabel,
MvcCore\Ext\Forms\Fields\IOptions,
MvcCore\Ext\Forms\Fields\IMultiple,
MvcCore\Ext\Forms\IFieldsGroup
uses
MvcCore\Ext\Forms\Field\Props\VisibleField,
MvcCore\Ext\Forms\Field\Props\Label,
MvcCore\Ext\Forms\Field\Props\Options,
MvcCore\Ext\Forms\Field\Props\GroupLabelCssClasses,
MvcCore\Ext\Forms\Field\Props\GroupLabelAttrs
-
MvcCore\Ext\Forms\Fields\RadioGroup
Methods summary
public
boolean
|
#
GetMultiple( )
Radio group is always not marked as multiple value control. This function
always return FALSE for radio group instance.
Radio group is always not marked as multiple value control. This function
always return FALSE for radio group instance.
Returns
boolean
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-multiple
Overrides
|
public
MvcCore\Ext\Forms\FieldsGroup
|
#
SetMultiple( boolean $multiple = TRUE )
Field group is always not marked as multiple value control. This function
does nothing, because multiple option has to be FALSE for radio group instance all time.
Field group is always not marked as multiple value control. This function
does nothing, because multiple option has to be FALSE for radio group instance all time.
Parameters
Returns
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-multiple
Overrides
|
public
array
&
|
#
GetValidatorData( array $fieldPropsDefaultValidValues = [] )
Return field specific data for validator.
Return field specific data for validator.
Parameters
- $fieldPropsDefaultValidValues
Returns
array
Overrides
|
public
|
#
__construct( array $cfg = [] )
Create new form <input type="radio"> control instance.
Create new form <input type="radio"> control instance.
Parameters
- $cfg
Config array with public properties and it's
values which you want to configure, presented
in camel case properties names syntax.
Throws
InvalidArgumentException
Overrides
|
Methods inherited from MvcCore\Ext\Forms\FieldsGroup
CreateInstance(),
GetValue(),
PreDispatch(),
RenderControl(),
RenderControlInsideLabel(),
RenderControlItem(),
RenderLabel(),
RenderNaturally(),
SetForm(),
SetValue(),
renderControlItemCompleteAttrsClassesAndText()
|
Methods inherited from MvcCore\Ext\Forms\Fields\ILabel
AddLabelAttrs(),
GetLabel(),
GetLabelAttr(),
GetLabelAttrs(),
GetLabelSide(),
GetRenderMode(),
SetLabel(),
SetLabelAttr(),
SetLabelAttrs(),
SetLabelSide(),
SetRenderMode()
|
Methods inherited from MvcCore\Ext\Forms\Fields\IVisibleField
GetAccessKey(),
GetAutoFocus(),
GetDisabled(),
GetReadOnly(),
GetRequired(),
GetTabIndex(),
SetAccessKey(),
SetAutoFocus(),
SetDisabled(),
SetReadOnly(),
SetRequired(),
SetTabIndex()
|
Methods inherited from MvcCore\Ext\Forms\IField
AddControlAttrs(),
AddCssClasses(),
AddError(),
AddValidators(),
GetControlAttr(),
GetControlAttrs(),
GetCssClasses(),
GetCssSupportingFile(),
GetId(),
GetJsClassName(),
GetJsSupportingFile(),
GetName(),
GetTemplates(),
GetTitle(),
GetType(),
GetValidators(),
GetViewScript(),
HasValidator(),
RemoveValidator(),
Render(),
RenderErrors(),
RenderLabelAndControl(),
RenderTemplate(),
SetControlAttr(),
SetControlAttrs(),
SetCssClasses(),
SetCssSupportingFile(),
SetId(),
SetJsClassName(),
SetJsSupportingFile(),
SetName(),
SetTemplate(),
SetTemplates(),
SetTitle(),
SetTranslate(),
SetType(),
SetValidators(),
SetViewScript()
|
Methods used from MvcCore\Ext\Forms\Field\Props\Label
AddLabelAttrs(),
GetLabel(),
GetLabelAttr(),
GetLabelAttrs(),
GetLabelSide(),
GetRenderMode(),
SetLabel(),
SetLabelAttr(),
SetLabelAttrs(),
SetLabelSide(),
SetRenderMode()
|
Methods used from MvcCore\Ext\Forms\Field\Getters
GetControlAttr(),
GetControlAttrs(),
GetCssClasses(),
GetCssSupportingFile(),
GetId(),
GetJsClassName(),
GetJsSupportingFile(),
GetName(),
GetTemplates(),
GetTitle(),
GetTranslate(),
GetType(),
GetValidators(),
GetViewScript(),
HasValidator()
|
Methods used from MvcCore\Ext\Forms\Field\Setters
AddControlAttrs(),
AddCssClasses(),
AddError(),
AddValidators(),
RemoveValidator(),
SetControlAttr(),
SetControlAttrs(),
SetCssClasses(),
SetCssSupportingFile(),
SetId(),
SetJsClassName(),
SetJsSupportingFile(),
SetName(),
SetTemplate(),
SetTemplates(),
SetTitle(),
SetTranslate(),
SetType(),
SetValidators(),
SetViewScript()
|
Properties summary
protected
string
|
$type
|
|
protected
string|null
|
$value
Value type for RadioGroup is always string or NULL , not any array type.
So it's necessary to change back the value property type
defined in parent class FieldsGroup from array to string|NULL .
Value type for RadioGroup is always string or NULL , not any array type.
So it's necessary to change back the value property type
defined in parent class FieldsGroup from array to string|NULL .
|
|
protected
string[]|Closure[]
|
$validators
Validators:
- ValueInOptions - to validate if submitted string is presented in radio options keys.
Validators:
- ValueInOptions - to validate if submitted string is presented in radio options keys.
|
|
Properties used from MvcCore\Ext\Forms\Field\Props
$controlAttrs,
$cssClasses,
$cssSupportingFile,
$declaredProtectedProperties,
$errors,
$form,
$id,
$jsClassName,
$jsSupportingFile,
$name,
$templates,
$title,
$translate,
$translateTitle,
$view,
$viewScript
|