Overview

Namespaces

  • MvcCore
    • Ext
      • Auth
        • Virtual
      • Debug
        • Tracy
      • Form
        • Core
        • Validators
      • Request
      • Router
        • Lang
      • View
        • Helpers
  • None

Classes

  • Button
  • Checkbox
  • CheckboxGroup
  • CountrySelect
  • Date
  • DateTime
  • Email
  • Hidden
  • NoType
  • Number
  • Password
  • RadioGroup
  • Range
  • ResetButton
  • ResetInput
  • Select
  • SubmitButton
  • SubmitInput
  • Text
  • Textarea
  • Time
  • Overview
  • Namespace
  • Class
  • Tree

Class CheckboxGroup

MvcCore\Ext\Form\Core\Field
Extended by MvcCore\Ext\Form\Core\FieldGroup
Extended by MvcCore\Ext\Form\CheckboxGroup
Namespace: MvcCore\Ext\Form
Located at ext-form/src/MvcCore/Ext/Form/CheckboxGroup.php
Methods summary
public
# __construct( array $cfg = array() )

Create new form control instance.

Create new form control instance.

Parameters

$cfg

config array with camel case public properties and its values which you want to configure.

Throws

MvcCore\Ext\Form\Core\Exception

Overrides

MvcCore\Ext\Form\Core\Field::__construct()
public
# SetMinSelectedOptionsCount( $minSelectedOptionsCount )
public
# SetMinSelectedOptionsMessage( $minSelectedOptionsMessage )
public
# SetMinSelectedOptionsBubbleMessage( $minSelectedOptionsBubbleMessage )
public
# SetMaxSelectedOptionsCount( $maxSelectedOptionsCount )
public
# SetMaxSelectedOptionsMessage( $maxSelectedOptionsMessage )
public
# SetMaxSelectedOptionsBubbleMessage( $maxSelectedOptionsBubbleMessage )
public
# OnAdded( MvcCore\Ext\Form & $form )

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

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

Parameters

$form

Throws

MvcCore\Ext\Form\Core\Exception

Overrides

MvcCore\Ext\Form\Core\FieldGroup::OnAdded()
protected array
# renderControlItemCompleteAttrsClassesAndText( string $key, string|array $option )

Complete by $field->Options key and option value: - label text - label attributes string - control attributes string

Complete by $field->Options key and option value: - label text - label attributes string - control attributes string

Parameters

$key
$option

Returns

array

Overrides

MvcCore\Ext\Form\Core\FieldGroup::renderControlItemCompleteAttrsClassesAndText()
public
# SetUp( )

Set up field properties before rendering process. - translate all option texts Parent method: - set up field render mode - set up translation boolean - translate label if any

Set up field properties before rendering process. - translate all option texts Parent method: - set up field render mode - set up translation boolean - translate label if any

Overrides

MvcCore\Ext\Form\Core\FieldGroup::SetUp()
Methods inherited from MvcCore\Ext\Form\Core\FieldGroup
AddGroupCssClass(), AddGroupLabelAttr(), RenderControl(), RenderControlInsideLabel(), RenderControlItem(), RenderLabel(), RenderNaturally(), SetGroupCssClasses(), SetGroupLabelAttrs(), SetOptions()
Methods inherited from MvcCore\Ext\Form\Core\Field
AddControlAttr(), AddCssClass(), AddError(), AddLabelAttr(), AddValidators(), GetValue(), Render(), RenderErrors(), RenderLabelAndControl(), RenderTemplate(), SetControlAttrs(), SetCss(), SetCssClasses(), SetDisabled(), SetJs(), SetJsClass(), SetLabel(), SetLabelAttrs(), SetLabelSide(), SetName(), SetReadonly(), SetRenderMode(), SetRequired(), SetTemplatePath(), SetTranslate(), SetType(), SetValidators(), SetValue(), __set(), renderAttrsWithFieldVars(), renderControlAttrsWithFieldVars(), renderLabelAttrsWithFieldVars()
Properties summary
public string $Type

Form group pseudo control type, unique type accross all form field types.

Form group pseudo control type, unique type accross all form field types.

# 'checkbox'
public integer $MinSelectedOptionsCount
# 0
public string $MinSelectedOptionsMessage
# ''
public string $MinSelectedOptionsBubbleMessage
# ''
public integer $MaxSelectedOptionsCount
# 0
public string $MaxSelectedOptionsMessage
# ''
public string $MaxSelectedOptionsBubbleMessage
# ''
public string $MaxSelectedOptionsClassName
# 'max-selected-options'
public string[]|Closure[] $Validators

List of validator classes end-names or list of closure functions accepting arguments: $submitValue, $fieldName, \MvcCore\Ext\Form\Core\Field & $field and returning safe value as result. Closure function should call $field->Form->AddError() internaly if necessary and submitted value is not correct. All validator classes are located in directory: /Form/Validators/... For validator class \MvcCore\Ext\Form\Validators\Numeric is necessary only tu set 'Numeric'.

List of validator classes end-names or list of closure functions accepting arguments: $submitValue, $fieldName, \MvcCore\Ext\Form\Core\Field & $field and returning safe value as result. Closure function should call $field->Form->AddError() internaly if necessary and submitted value is not correct. All validator classes are located in directory: /Form/Validators/... For validator class \MvcCore\Ext\Form\Validators\Numeric is necessary only tu set 'Numeric'.

# array("ValueInOptions")
public string $JsClass

Supporting javascript full class name.

Supporting javascript full class name.

# 'MvcCoreForm.CheckboxGroup'
public string $Js

Supporting javascript file relative path. Replacement 'MVCCORE_FORM_DIR' is in rendering process replaced by \MvcCore\Ext\Form library root dir or by any other reconfigured value from $this->Form->jsAssetsRootDir;

Supporting javascript file relative path. Replacement 'MVCCORE_FORM_DIR' is in rendering process replaced by \MvcCore\Ext\Form library root dir or by any other reconfigured value from $this->Form->jsAssetsRootDir;

# '__MVCCORE_FORM_DIR__/fields/checkbox-group.js'
public static array|stdClass $Templates

Internal common templates how to render field group elements naturaly.

Internal common templates how to render field group elements naturaly.

# array( 'control' => '<input id="{id}" name="{name}[]" type="{type}" value="{value}"{checked}{attrs} />', )
Properties inherited from MvcCore\Ext\Form\Core\FieldGroup
$GroupCssClasses, $GroupLabelAttrs, $Options, $Value
Properties inherited from MvcCore\Ext\Form\Core\Field
$ControlAttrs, $Css, $CssClasses, $Disabled, $Errors, $Form, $Id, $Label, $LabelAttrs, $LabelSide, $Name, $Readonly, $RenderMode, $Required, $TemplatePath, $Translate, $View, $declaredProtectedProperties
MvcCore API documentation generated by ApiGen