Class ButtonInput
Responsibility: init, pre-dispatch and render button based on <input type="button">
HTML element. Button has text OK
by default and no validators.
-
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\Fields\ButtonInput
implements
MvcCore\Ext\Forms\Fields\IVisibleField
uses
MvcCore\Ext\Forms\Field\Props\VisibleField
Methods summary
public
MvcCore\Ext\Forms\Fields\ButtonInput
|
#
__construct( array $cfg = [] )
Create new form <input type="button" /> control instance.
Create new form <input type="button" /> 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.
Returns
Throws
InvalidArgumentException
Overrides
|
public
MvcCore\Ext\Forms\Fields\ButtonInput
|
#
SetForm( MvcCore\Ext\IForm $form )
This INTERNAL method is called from \MvcCore\Ext\Form after field
is added into form instance by $form->AddField(); method. Do not
use this method even if you don't develop any form field.
- 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.
- Set up translate boolean property.
- Check if exists button value string.
- Translate button value if necessary.
This INTERNAL method is called from \MvcCore\Ext\Form after field
is added into form instance by $form->AddField(); method. Do not
use this method even if you don't develop any form field.
- 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.
- Set up translate boolean property.
- Check if exists button value string.
- Translate button value if necessary.
Parameters
Returns
Throws
InvalidArgumentException
Overrides
|
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 render mode if not defined.
- Translate label text if necessary.
- Translate value text if necessary.
- Set up tab-index 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 render mode if not defined.
- Translate label text if necessary.
- Translate value text if necessary.
- Set up tab-index if necessary.
Overrides
|
Methods inherited from MvcCore\Ext\Forms\IField
AddControlAttrs(),
AddCssClasses(),
AddError(),
AddValidators(),
GetControlAttr(),
GetControlAttrs(),
GetCssClasses(),
GetCssSupportingFile(),
GetId(),
GetJsClassName(),
GetJsSupportingFile(),
GetName(),
GetTemplates(),
GetTitle(),
GetType(),
GetValidators(),
GetValue(),
GetViewScript(),
HasValidator(),
RemoveValidator(),
Render(),
RenderControl(),
RenderControlInsideLabel(),
RenderErrors(),
RenderLabel(),
RenderLabelAndControl(),
RenderNaturally(),
RenderTemplate(),
SetControlAttr(),
SetControlAttrs(),
SetCssClasses(),
SetCssSupportingFile(),
SetId(),
SetJsClassName(),
SetJsSupportingFile(),
SetName(),
SetTemplate(),
SetTemplates(),
SetTitle(),
SetTranslate(),
SetType(),
SetValidators(),
SetValue(),
SetViewScript()
|
Methods inherited from MvcCore\Ext\Forms\Fields\IVisibleField
GetAccessKey(),
GetAutoFocus(),
GetDisabled(),
GetReadOnly(),
GetRequired(),
GetTabIndex(),
SetAccessKey(),
SetAutoFocus(),
SetDisabled(),
SetReadOnly(),
SetRequired(),
SetTabIndex()
|
Methods used from MvcCore\Ext\Forms\Field\Getters
GetControlAttr(),
GetControlAttrs(),
GetCssClasses(),
GetCssSupportingFile(),
GetId(),
GetJsClassName(),
GetJsSupportingFile(),
GetName(),
GetTemplates(),
GetTitle(),
GetTranslate(),
GetType(),
GetValidators(),
GetValue(),
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(),
SetValue(),
SetViewScript()
|
Methods used from MvcCore\Ext\Forms\Field\Rendering
Render(),
RenderControl(),
RenderControlInsideLabel(),
RenderErrors(),
RenderLabel(),
RenderLabelAndControl(),
RenderNaturally(),
RenderTemplate(),
renderAttrsWithFieldVars(),
renderControlAttrsWithFieldVars(),
renderLabelAttrsWithFieldVars()
|
Properties summary
protected
string
|
$type
|
|
protected
string
|
$value
Default visible button text - OK .
This button text is automatically checked, if there is at least any
visible text and automatically translated, if any translator callable
defined in form instance.
Default visible button text - OK .
This button text is automatically checked, if there is at least any
visible text and automatically translated, if any translator callable
defined in form instance.
|
|
protected static
string
|
$templates
Standard field control natural template string.
Standard field control natural template string.
|
#
[
'control' => '<input type="button" id="{id}" name="{name}" value="{value}"{attrs} />',
]
|
Properties used from MvcCore\Ext\Forms\Field\Props
$controlAttrs,
$cssClasses,
$cssSupportingFile,
$declaredProtectedProperties,
$errors,
$form,
$id,
$jsClassName,
$jsSupportingFile,
$name,
$title,
$translate,
$translateTitle,
$validators,
$view,
$viewScript
|