Class Form
Responsibility: Main form class with all <form>
configuration, attributes, field instances and it's validators. To create any HTML form, you need to instantiate this class, configure an id, action and more.
- MvcCore\Controller implements MvcCore\IController uses MvcCore\Controller\Props, MvcCore\Controller\GettersSetters, MvcCore\Controller\Dispatching, MvcCore\Controller\Rendering
-
MvcCore\Ext\Form implements MvcCore\Ext\IForm uses MvcCore\Ext\Form\InternalProps, MvcCore\Ext\Form\ConfigProps, MvcCore\Ext\Form\GetMethods, MvcCore\Ext\Form\SetMethods, MvcCore\Ext\Form\AddMethods, MvcCore\Ext\Form\FieldMethods, MvcCore\Ext\Form\Session, MvcCore\Ext\Form\Csrf, MvcCore\Ext\Form\Rendering, MvcCore\Ext\Form\Assets, MvcCore\Ext\Form\Submitting
public
|
#
__construct(
Create \MvcCore\Ext\Form instance. Please don't forget to configure at least $form->Id, $form->Action, any control to work with and finally any button:submit/input:submit to submit the form to any URL defined in $form->Action. |
protected
|
#
throwNewInvalidArgumentException( string $errorMsg )
Throw new |
public
|
#
Init( boolean $submit = FALSE )
Initialize the form, check if form is initialized or not and do it only once.
Check if any form id exists and exists only once and initialize translation
boolean for better field initializations. This is template method. To define
any fields in custom |
public
|
|
protected
|
#
preDispatchLoadErrors(
Initialize form errors from session for all fields in |
protected
|
#
preDispatchLoadValues(
Initialize values from session for all fields in |
public
string
|
AddAcceptCharset(),
AddCsrfErrorHandler(),
AddCssClasses(),
AddCssSupportFile(),
AddError(),
AddJsSupportFile(),
AddValidatorsNamespaces()
|
ClearSession(),
SaveSession(),
getSession()
|
GetCsrf(),
ProcessCsrfErrorHandlersQueue(),
SetEnableCsrf(),
SetUpCsrf(),
SubmitCsrfTokens()
|
Render(),
RenderBegin(),
RenderContent(),
RenderEnd(),
RenderErrors(),
RenderSupportingCss(),
RenderSupportingJs(),
cleanSessionErrorsAfterRender()
|
absolutizeSupportingFilePath(),
completeSupportingFilesToRender(),
renderSupportingFile()
|
string |
VERSION
MvcCore Extension - Form - version: Comparison by PHP function version_compare(); |
#
'5.0.0'
|
$view
|