Class ResetInput
Responsibility: init, pre-dispatch and render <input type="reset">
with default text Reset
and it's supporting JS code. Input has no validator and no custom result state.
-
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\ResetInput
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="reset" /> control instance.
Create new form <input type="reset" /> 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\ResetInput
|
#
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.
- Add supporting javascript file.
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.
- Add supporting javascript file.
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 - Reset .
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 - Reset .
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
string
|
$jsClassName
Supporting javascript full javascript class name.
If you want to use any custom supporting javascript prototyped class
for any additional purposes for your custom field, you need to use
$field->jsSupportingFile property to define path to your javascript file
relatively from configured \MvcCore\Ext\Form::SetJsSupportFilesRootDir(...);
value. Than you have to add supporting javascript file path into field form
in $field->PreDispatch(); method to render those files immediately after form
(once) or by any external custom assets renderer configured by:
$form->SetJsSupportFilesRenderer(...); method.
Or you can add your custom supporting javascript files into response by your
own and also you can run your helper javascripts also by your own. Is up to you.
NULL by default.
Supporting javascript full javascript class name.
If you want to use any custom supporting javascript prototyped class
for any additional purposes for your custom field, you need to use
$field->jsSupportingFile property to define path to your javascript file
relatively from configured \MvcCore\Ext\Form::SetJsSupportFilesRootDir(...);
value. Than you have to add supporting javascript file path into field form
in $field->PreDispatch(); method to render those files immediately after form
(once) or by any external custom assets renderer configured by:
$form->SetJsSupportFilesRenderer(...); method.
Or you can add your custom supporting javascript files into response by your
own and also you can run your helper javascripts also by your own. Is up to you.
NULL by default.
|
|
protected
string
|
$jsSupportingFile
Field supporting javascript file relative path.
If you want to use any custom supporting javascript file (with prototyped
class) for any additional purposes for your custom field, you need to
define path to your javascript file relatively from configured
\MvcCore\Ext\Form::SetJsSupportFilesRootDir(...); value.
Than you have to add supporting javascript file path into field form
in $field->PreDispatch(); method to render those files immediately after form
(once) or by any external custom assets renderer configured by:
$form->SetJsSupportFilesRenderer(...); method.
Or you can add your custom supporting javascript files into response by your
own and also you can run your helper javascripts also by your own. Is up to you.
NULL by default.
Field supporting javascript file relative path.
If you want to use any custom supporting javascript file (with prototyped
class) for any additional purposes for your custom field, you need to
define path to your javascript file relatively from configured
\MvcCore\Ext\Form::SetJsSupportFilesRootDir(...); value.
Than you have to add supporting javascript file path into field form
in $field->PreDispatch(); method to render those files immediately after form
(once) or by any external custom assets renderer configured by:
$form->SetJsSupportFilesRenderer(...); method.
Or you can add your custom supporting javascript files into response by your
own and also you can run your helper javascripts also by your own. Is up to you.
NULL by default.
|
#
\MvcCore\Ext\IForm::FORM_ASSETS_DIR_REPLACEMENT . '/assets/reset.js'
|
protected static
string
|
$templates
Standard field control natural template string.
Standard field control natural template string.
|
#
[
'control' => '<input type="reset" id="{id}" name="{name}" value="{value}"{attrs} />',
]
|
Properties used from MvcCore\Ext\Forms\Field\Props
$controlAttrs,
$cssClasses,
$cssSupportingFile,
$declaredProtectedProperties,
$errors,
$form,
$id,
$name,
$title,
$translate,
$translateTitle,
$validators,
$view,
$viewScript
|