Methods summary
public static
string
|
#
GetFormsDir( )
Get global views forms directory placed by default
inside "/App/Views" directory.
Default value is "Forms" , so scripts app path
is "/App/Views/Forms" .
Get global views forms directory placed by default
inside "/App/Views" directory.
Default value is "Forms" , so scripts app path
is "/App/Views/Forms" .
Returns
string
|
public static
string
|
#
SetFormsDir( string $formsDir = 'Forms' )
Set global views forms directory placed by default
inside "/App/Views" directory.
Default value is "Forms" , so scripts app path
is "/App/Views/Forms" .
Set global views forms directory placed by default
inside "/App/Views" directory.
Default value is "Forms" , so scripts app path
is "/App/Views/Forms" .
Parameters
Returns
string
|
public static
string
|
#
GetFieldsDir( )
Get global views fields directory placed by default
inside "/App/Views" directory.
Default value is "Forms/Fields" , so
scripts app path is "/App/Views/Forms/Fields" .
Get global views fields directory placed by default
inside "/App/Views" directory.
Default value is "Forms/Fields" , so
scripts app path is "/App/Views/Forms/Fields" .
Returns
string
|
public static
string
|
#
SetFieldsDir( string $fieldsDir = 'Forms/Fields' )
Set global views fields directory placed by default
inside "/App/Views" directory.
Default value is "Forms/Fields" , so
scripts app path is "/App/Views/Forms/Fields" .
Set global views fields directory placed by default
inside "/App/Views" directory.
Default value is "Forms/Fields" , so
scripts app path is "/App/Views/Forms/Fields" .
Parameters
Returns
string
|
public
MvcCore\View
|
#
GetView( )
Get controller instance as reference.
Get controller instance as reference.
Returns
|
public
MvcCore\Ext\Forms\View
|
#
SetView( MvcCore\IView $view )
Set controller and it's view instance.
Set controller and it's view instance.
Parameters
Returns
|
public
MvcCore\Ext\Form
|
#
GetForm( )
Get form instance to render.
Get form instance to render.
Returns
|
public
MvcCore\Ext\Forms\View
|
|
public
MvcCore\Ext\Forms\Field
|
|
public
MvcCore\Ext\Forms\View
|
|
public
mixed
|
#
__get( string $name )
Get any value by given name existing in local store. If there is no value
in local store by given name, try to get result value into store by
field reflection class from field instance property if view is used for
field rendering. If there is still no value found, try to get result value
into store by form reflection class from form instance property and if
still no value found, try to get result value from local view instance
__get() method.
Get any value by given name existing in local store. If there is no value
in local store by given name, try to get result value into store by
field reflection class from field instance property if view is used for
field rendering. If there is still no value found, try to get result value
into store by form reflection class from form instance property and if
still no value found, try to get result value from local view instance
__get() method.
Parameters
Returns
mixed
|
public
boolean
|
#
__isset( string $name )
Get TRUE by given name existing in local store. If there is no value
in local store by given name, try to get result value into store by
field reflection class from field instance property if view is used for
field rendering. If there is still no value found, try to get result value
into store by form reflection class from form instance property and if
still no value found, try to get result value from local view instance
__get() method.
Get TRUE by given name existing in local store. If there is no value
in local store by given name, try to get result value into store by
field reflection class from field instance property if view is used for
field rendering. If there is still no value found, try to get result value
into store by form reflection class from form instance property and if
still no value found, try to get result value from local view instance
__get() method.
Parameters
Returns
boolean
|
public
mixed
|
#
__call( string $method, mixed $arguments )
Call public field method if exists in field instance and view is used for
field rendering or call public form method if exists in form instance or
try to call view helper by parent __call() method.
Call public field method if exists in field instance and view is used for
field rendering or call public form method if exists in form instance or
try to call view helper by parent __call() method.
Parameters
Returns
mixed
|
public
string
|
#
RenderTemplate( )
Render configured form template.
Render configured form template.
Returns
string
|
public
string
|
#
RenderNaturally( )
Render form naturally by cycles inside php scripts.
All form fields will be rendered inside empty
<
div> elements.
Render form naturally by cycles inside php scripts.
All form fields will be rendered inside empty
<
div> elements.
Returns
string
|
public
string
|
#
RenderBegin( )
Render form begin.
Render opening
<
form> tag and hidden input with CSRF tokens.
Render form begin.
Render opening
<
form> tag and hidden input with CSRF tokens.
Returns
string
|
public
string
|
#
RenderCsrf( )
Render hidden input with CSRF tokens.
This method is not necessary to call, it's
called internally by $form->View->RenderBegin();
Render hidden input with CSRF tokens.
This method is not necessary to call, it's
called internally by $form->View->RenderBegin();
Returns
string
|
public
stdClass
|
#
GetCsrf( )
Return current CSRF (Cross Site Request Forgery) hidden
input name and it's value as \stdClass .
Result \stdClass has keys: name and value .
Return current CSRF (Cross Site Request Forgery) hidden
input name and it's value as \stdClass .
Result \stdClass has keys: name and value .
Returns
stdClass
|
public
string
|
#
RenderErrors( )
Render form errors.
If form is configured to render all errors together at form beginning,
this function completes all form errors into div.errors with div.error elements
inside containing each single errors message.
Render form errors.
If form is configured to render all errors together at form beginning,
this function completes all form errors into div.errors with div.error elements
inside containing each single errors message.
Returns
string
|
public
string
|
#
RenderContent( )
Render form content - form fields.
Go through all $form->fields and call $field->Render(); on every field
and put it into an empty <div> element. Render each field in full possible
way - naturally by label configuration with possible errors configured beside
or with custom field template.
Render form content - form fields.
Go through all $form->fields and call $field->Render(); on every field
and put it into an empty <div> element. Render each field in full possible
way - naturally by label configuration with possible errors configured beside
or with custom field template.
Returns
string
|
public
string
|
#
RenderEnd( )
Render form end.
Render html closing </form> tag and supporting javascript and css files
if is form not using external js/css renderers.
Render form end.
Render html closing </form> tag and supporting javascript and css files
if is form not using external js/css renderers.
Returns
string
|
public static
string
|
#
Format( string $str = '', array $args = [] )
Format string function.
Parameters
- $str
- Template with replacements like
{0} , {1} , {anyStringKey} ...
- $args
Each value under it's index is replaced as
string representation by replacement in form {arrayKey}
Returns
string
|
public static
string
|
#
RenderAttrs( array $attributes = [] )
Render content of html tag attributes by key/value array.
Render content of html tag attributes by key/value array.
Parameters
Returns
string
|