Overview

Namespaces

  • MvcCore
    • Ext
      • Auth
        • Virtual
      • Debug
        • Tracy
      • Form
        • Core
        • Validators
      • Request
      • Router
        • Lang
      • View
        • Helpers
  • None

Classes

  • Base
  • Configuration
  • Field
  • FieldGroup
  • Helpers
  • Validator
  • View

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree

Class View

Core view: - static doctype storage - static storage for dir names with view scripts - possible to use for any controller/subcontroller/control/\MvcCore\Ext\Form - view prerender preparing and rendering - direct code evaluation - view helpers management - creating by predefined class names bases - instance storing and calling - views sub scripts relative path solving - Url() proxy method, AssetUrl() proxy method - magic calls: - __call() - helpers handling - __set() - to set anything in controller to get it back in view - __get() - to get anything in view previously completed in controller - no special view language implemented... why to use such stupid things...

MvcCore\View
Extended by MvcCore\Ext\Form\Core\View
Namespace: MvcCore\Ext\Form\Core
Located at ext-form/src/MvcCore/Ext/Form/Core/View.php
Methods summary
public
# __construct( MvcCore\Ext\Form & $form )

Form View Constructor, extending \MvcCore\View

Form View Constructor, extending \MvcCore\View

Parameters

$form

Overrides

MvcCore\View::__construct()
public mixed
# __call( string $method, mixed $arguments )

Call public field method if exists under called name or try to call any parent view helper.

Call public field method if exists under called name or try to call any parent view helper.

Parameters

$method
$arguments

Returns

mixed

Overrides

MvcCore\View::__call()
public string
# RenderTemplate( )

Render configured form template.

Render configured form template.

Returns

string
public string
# RenderNaturally( )

Render form naturaly by cycles inside php scripts. All form fields will be rendered inside empty

<

div> elements.

Render form naturaly 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 internaly by $form->View->RenderBegin();

Render hidden input with CSRF tokens. This method is not necessary to call, it's called internaly by $form->View->RenderBegin();

Returns

string
public stdClass
# GetCsrf( )

Return current cross site request forgery hidden input name and it's value as stdClass. Result stdClass elements has keys 'name' and 'value'.

Return current cross site request forgery hidden input name and it's value as stdClass. Result stdClass elements 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. 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 - naturaly by label configuration with possible errors configured beside or with custom field template.

Render form content. 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 - naturaly by label configuration with possible errors configured beside or with custom field template.

Returns

string
public string
# RenderEnd( )

Render form end. Render html closing tag and supporting javascript and css files if is form not using external js/css renderers.

Render form end. Render html closing 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 = array() )

Format string function.

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 $atrributes = array() )

Render content of html tag attributes by key/value array.

Render content of html tag attributes by key/value array.

Parameters

$atrributes

Returns

string
Methods inherited from MvcCore\View
AddHelpersClassBases(), AssetUrl(), Evaluate(), GetContent(), GetController(), GetViewScriptFullPath(), Render(), RenderLayout(), RenderLayoutAndContent(), RenderScript(), SetUp(), StaticInit(), Url(), __set()
Constants inherited from MvcCore\View
DOCTYPE_HTML4, DOCTYPE_HTML5, DOCTYPE_XHTML, EXTENSION
Properties summary
public MvcCore\Ext\Form $Form
# null
public MvcCore\View|mixed $View
# null
Properties inherited from MvcCore\View
$Controller, $Doctype, $HelpersClassBases, $HelpersDir, $LayoutsDir, $ScriptsDir, $originalyDeclaredProperties
MvcCore API documentation generated by ApiGen