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 Select

MvcCore\Ext\Form\Core\Field
Extended by MvcCore\Ext\Form\Select

Direct known subclasses

MvcCore\Ext\Form\CountrySelect
Namespace: MvcCore\Ext\Form
Located at ext-form/src/MvcCore/Ext/Form/Select.php
Methods summary
public
# SetMultiple( $multiple )
public
# SetSize( $size )
public
# SetFirstOptionText( $firstOptionText )
public
# SetOptions( array $options = array() )
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
# 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 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 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\Field::OnAdded()
public
# SetUp( )

Set up field properties before rendering process. - set up field render mode - set up translation boolean - translate label if any

Set up field properties before rendering process. - set up field render mode - set up translation boolean - translate label if any

Overrides

MvcCore\Ext\Form\Core\Field::SetUp()
protected
# setUpTranslateOptionOptGroup( & $optGroup )
protected
# setUpTranslateOptionsAdvanced( & $key, & $option )
public string
# RenderControl( )

Render control tag only without label or specific errors.

Render control tag only without label or specific errors.

Returns

string

Overrides

MvcCore\Ext\Form\Core\Field::RenderControl()
public
# RenderControlOptions( )
protected
# renderControlOptionKeyValue( & $key, & $value )
protected
# renderControlOptionOptGroup( & $optGroup )
protected
# renderControlOptionsAdvanced( $key, $option )
Methods inherited from MvcCore\Ext\Form\Core\Field
AddControlAttr(), AddCssClass(), AddError(), AddLabelAttr(), AddValidators(), GetValue(), Render(), RenderControlInsideLabel(), RenderErrors(), RenderLabel(), RenderLabelAndControl(), RenderNaturally(), 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 control type, usually used in attr value, but unique type accross all form field types.

Form control type, usually used in attr value, but unique type accross all form field types.

# 'select'
public string|array $Value
# ''
public boolean $Multiple
# FALSE
public integer $Size
# 3
public string $FirstOptionText
# ''
public array $Options
# array()
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 static array $Templates

Core rendering templates storrage. Those templates are used in form natural rendering process, form custom template rendering process, natural field rendering process but not by custom field rendering process.

Core rendering templates storrage. Those templates are used in form natural rendering process, form custom template rendering process, natural field rendering process but not by custom field rendering process.

# array( 'control' => '<select id="{id}" name="{name}"{multiple}{size}{attrs}>{options}</select>', 'option' => '<option value="{value}"{selected}{class}{attrs}>{text}</option>', 'optgroup' => '<optgroup{label}>{options}</optgroup>', )
Properties inherited from MvcCore\Ext\Form\Core\Field
$ControlAttrs, $Css, $CssClasses, $Disabled, $Errors, $Form, $Id, $Js, $JsClass, $Label, $LabelAttrs, $LabelSide, $Name, $Readonly, $RenderMode, $Required, $TemplatePath, $Translate, $View, $declaredProtectedProperties
MvcCore API documentation generated by ApiGen