Methods summary
public static
MvcCore\Ext\Forms\FieldsGroup
|
#
CreateInstance( array $cfg = [] )
Create new form control group instance.
Create new form control group instance.
Parameters
- $cfg
Config array with public properties and it's
values which you want to configure, presented
in camel case properties names syntax.
Returns
Throws
InvalidArgumentException
|
public
string[]
&
|
#
GetGroupLabelCssClasses( )
Get css class or classes for group label as array of strings.
Get css class or classes for group label as array of strings.
Returns
string[]
|
public
MvcCore\Ext\Forms\Field
|
#
SetGroupLabelCssClasses( string|string[] $groupLabelCssClasses )
Set css class or classes for group label,
as array of strings or string with classes
separated by space. Any previously defined
group css classes will be replaced.
Set css class or classes for group label,
as array of strings or string with classes
separated by space. Any previously defined
group css classes will be replaced.
Parameters
Returns
|
public
MvcCore\Ext\Forms\Field
|
#
AddGroupLabelCssClasses( string|string[] $groupLabelCssClasses )
Add css class or classes for group label as array of
strings or string with classes separated by space.
Add css class or classes for group label as array of
strings or string with classes separated by space.
Parameters
Returns
|
public
array
&
|
#
GetGroupLabelAttrs( )
Get any additional attributes for group label, defined
as key (for attribute name) and value (for attribute value).
Get any additional attributes for group label, defined
as key (for attribute name) and value (for attribute value).
Returns
array
|
public
MvcCore\Ext\Forms\Field
|
#
SetGroupLabelAttrs( array $groupLabelAttrs = [] )
Set any additional attributes for group label, defined
as key (for attribute name) and value (for attribute value).
Any previously defined attributes will be replaced.
Set any additional attributes for group label, defined
as key (for attribute name) and value (for attribute value).
Any previously defined attributes will be replaced.
Parameters
Returns
|
public
MvcCore\Ext\Forms\Field
|
#
AddGroupLabelAttr( array $groupLabelAttrs = [] )
Add any additional attributes for group label, defined
as key (for attribute name) and value (for attribute value).
All additional attributes will be completed as array merge
with previous values and new values.
Add any additional attributes for group label, defined
as key (for attribute name) and value (for attribute value).
All additional attributes will be completed as array merge
with previous values and new values.
Parameters
Returns
|
public
string[]|string|null
|
#
GetValue( )
Get form group controls value, in most cases it's an array of strings.
For extended class RadioGroup - the type is only a string or NULL .
Get form group controls value, in most cases it's an array of strings.
For extended class RadioGroup - the type is only a string or NULL .
Returns
string[]|string|null
|
public
MvcCore\Ext\Forms\FieldsGroup
|
#
SetValue( float[]|int[]|string[]|float|integer|string|null $value )
Set form group controls value, in most cases - it could be an array with types,
which are possible simply to convert into array of strings. NULL value is then
an empty array. For extended class RadioGroup - the value type is only a string
or NULL .
Set form group controls value, in most cases - it could be an array with types,
which are possible simply to convert into array of strings. NULL value is then
an empty array. For extended class RadioGroup - the value type is only a string
or NULL .
Parameters
Returns
|
public
boolean
|
#
GetMultiple( )
Field group is always marked as multiple value control. This function
always return TRUE for field group instance.
Field group is always marked as multiple value control. This function
always return TRUE for field group instance.
Returns
boolean
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-multiple
|
public
MvcCore\Ext\Forms\FieldsGroup
|
#
SetMultiple( $multiple = TRUE )
Field group is always marked as multiple value control. This function
does nothing, because multiple option has to be TRUE for field group instance all time.
Field group is always marked as multiple value control. This function
does nothing, because multiple option has to be TRUE for field group instance all time.
Returns
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-multiple
|
public
MvcCore\Ext\Forms\FieldsGroup
|
#
SetForm( MvcCore\Ext\IForm $form )
This INTERNAL method is called from \MvcCore\Ext\Form after field
is added into form by $form->AddField(); method.
Do not use this method even if you don't develop any form field group.
- Check if field has any name, which is required.
- Set up form and field id attribute by form id and field name.
- Set up required.
- Check if there are any options for current controls group.
This INTERNAL method is called from \MvcCore\Ext\Form after field
is added into form by $form->AddField(); method.
Do not use this method even if you don't develop any form field group.
- Check if field has any name, which is required.
- Set up form and field id attribute by form id and field name.
- Set up required.
- Check if there are any options for current controls group.
Parameters
Returns
Throws
InvalidArgumentException
|
public
|
#
PreDispatch( )
This INTERNAL method is called from \MvcCore\Ext\Form just before
field is naturally rendered. It sets up field for rendering process.
Do not use this method even if you don't develop any form field.
Set up field properties before rendering process.
- Set up field render mode.
- Set up translation boolean.
- Translate label property if any.
- Translate all option texts if necessary.
This INTERNAL method is called from \MvcCore\Ext\Form just before
field is naturally rendered. It sets up field for rendering process.
Do not use this method even if you don't develop any form field.
Set up field properties before rendering process.
- Set up field render mode.
- Set up translation boolean.
- Translate label property if any.
- Translate all option texts if necessary.
|
public
string
|
#
RenderNaturally( )
This INTERNAL method is called from \MvcCore\Ext\Forms\Field\Rendering
in rendering process. Do not use this method even if you don't develop any form field.
This INTERNAL method is called from \MvcCore\Ext\Forms\Field\Rendering
in rendering process. Do not use this method even if you don't develop any form field.
Render field naturally by render mode.
Field should be rendered with label beside, label around
or without label by local field configuration. Also there
could be rendered specific field errors before or after field
if field form is configured in that way.
Returns
string
|
public
string
|
#
RenderControlInsideLabel( )
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
Render field naturally by configured property $field->renderMode if any
or by default render mode without any label. Field should be rendered with
label beside, label around or without label by local field configuration.
Also there could be rendered specific field errors before or after field
if field form is configured in that way.
Returns
string
|
public
string
|
#
RenderControl( )
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
Render all sub-controls by multiple calls of $field->RenderControlItem(); .
Returns
string
|
public
string
|
#
RenderLabel( )
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
Render label tag only without control or specific errors.
Returns
string
|
public
string
|
#
RenderControlItem( string $key, string|array $option )
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
This INTERNAL method is called from \MvcCore\Ext\Forms\FieldsGroup
in rendering process. Do not use this method even if you don't develop any form field.
Render sub-controls with each sub-control label tag
and without group label or without group specific errors.
Parameters
Returns
string
|