Class FieldGroup
- MvcCore\Ext\Form\Core\Field
-
MvcCore\Ext\Form\Core\FieldGroup
Namespace: MvcCore\Ext\Form\Core
Located at ext-form/src/MvcCore/Ext/Form/Core/FieldGroup.php
public
|
#
SetOptions( array $options )
Set form group control options to render more values for more specified submitted keys. Examples: |
public
|
#
SetGroupCssClasses( $cssClasses )
Set css class(es) for group label, as array of strings or string with classes separated by space. |
public
|
#
AddGroupCssClass( $cssClasses )
Add css class(es) for group label, as array of strings or string with classes separated by space. |
public
|
#
SetGroupLabelAttrs( $attrs = array() )
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. |
public
|
#
AddGroupLabelAttr( $attr = array() )
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. |
public
|
#
OnAdded(
This method is called internaly from \MvcCore\Ext\Form after field is added into form by $form->AddField(); method. Do not use it if you are only user of this library. - check if there are any options for current controls group Parent method: - 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 |
public
|
|
public
string
|
#
RenderNaturally( )
Render field naturaly by render mode. Field shoud 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. |
public
string
|
#
RenderControlInsideLabel( )
Render field control inside label by local configuration, render field errors beside if form is configured to render specific errors beside controls. |
public
string
|
|
public
string
|
|
public
string
|
#
RenderControlItem( $key, $option )
Render subcontrols with each subcontrol label tag and without group label or without group specific errors. |
protected
array
|
#
renderControlItemCompleteAttrsClassesAndText( string $key, string|array $option )
Complete by $field->Options key and option value: - label text - label attributes string - control attributes string |
public
string
|
$Type
Form group pseudo control type, unique type accross all form field types. |
#
''
|
public
array
|
$Value
Form control value, always as array of string or numbers for group of controls. |
#
array()
|
public
array
|
$Options
Form group control options to render more subcontrol attributes for specified submitted values (array keys). This property configuration is required. Examples: |
#
array()
|
public
string[]
|
$GroupCssClasses
Css class for group label. |
#
array()
|
public
string[]
|
$GroupLabelAttrs
Any additional attributes for group label, defined as key (for attribute name) and value (for attribute value). |
#
array()
|
public static
array|stdClass
|
$Templates
Internal common templates how to render field group elements naturaly. |
#
array(
'label' => '<label for="{id}"{attrs}>{label}</label>',
'control' => '<input id="{id}" name="{name}" type="{type}" value="{value}"{checked}{attrs} />',
'togetherLabelLeft' => '<label for="{id}"{attrs}><span>{label}</span>{control}</label>',
'togetherLabelRight'=> '<label for="{id}"{attrs}>{control}<span>{label}</span></label>',
)
|
$ControlAttrs,
$Css,
$CssClasses,
$Disabled,
$Errors,
$Form,
$Id,
$Js,
$JsClass,
$Label,
$LabelAttrs,
$LabelSide,
$Name,
$Readonly,
$RenderMode,
$Required,
$TemplatePath,
$Translate,
$Validators,
$View,
$declaredProtectedProperties
|