__construct()
getContainerLabelTemplate()
getContainerRowTemplate()
getContainerWrapperTemplate()
getFormWrapperTemplate()
getItemErrorTemplate()
getItemErrorWrapperTemplate()
getItemLabelTemplate()
getItemRowTemplate()
getMandatoryMarkerTemplate()
getTranslator()
render()
setContainerLabelTemplate()
setContainerRowTemplate()
setContainerWrapperTemplate()
setErrorClass()
setFormWrapperTemplate()
setItemErrorTemplate()
setItemErrorWrapperTemplate()
setItemLabelTemplate()
setItemRowTemplate()
setMandatoryMarkerTemplate()
_addHiddenItem()
_getContainerLabel()
_getErrorProperties()
_getItemLabel()
_renderContainer()
_setTemplate()
_getTemplate()
$_containerLabelTemplate
$_containerRowTemplate
$_containerWrapperTemplate
$_errorClass
$_formWrapperTemplate
$_hiddenString
$_itemErrorTemplate
$_itemErrorWrapperTemplate
$_itemLabelTemplate
$_itemRowTemplate
$_mandatoryMarkerTemplate
$_translator
Returns rendered HTML form. Tables are used to place form elements.
category | Formagic |
---|---|
package | Renderer |
author | Florian Sonnenburg |
copyright | Copyright (c) 2007-2011 Florian Sonnenburg |
version | $Id: Html.php 169 2012-05-06 20:16:16Z meweasle $ |
__construct(Formagic_Translator $translator)
getContainerLabelTemplate(string | \Formagic_Item_Container $container) : string
string\Formagic_Item_Container
Optional. Returns a template defined for one specific container.
string
Template stringgetContainerRowTemplate(string | \Formagic_Item_Container $container) : string
string\Formagic_Item_Container
Optional. Returns a template defined for one specific container.
string
Template stringgetContainerWrapperTemplate(string $container) : string
string
Optional. Returns a template defined for one specific item with name $name.
string
Template stringgetFormWrapperTemplate() : string
string
Template stringgetItemErrorTemplate(string | \Formagic_Item_Abstract $item) : string
string
Template stringgetItemErrorWrapperTemplate(string | \Formagic_Item_Abstract $item) : string
string
Template stringgetItemLabelTemplate(string | \Formagic_Item_Abstract $item) : string
string
Template stringgetItemRowTemplate(string | \Formagic_Item_Abstract $item) : string
string
Template stringgetMandatoryMarkerTemplate(string | \Formagic_Item_Abstract $item) : string
string
Template stringgetTranslator() : \Formagic_Translator
\Formagic_Translator
Translator objectrender(Formagic $form) : string
setContainerLabelTemplate(string $template, string | \Formagic_Item_Container $container) : \Formagic_Renderer_Html
Available placeholders: - %LABEL%: Label string
see | \setContainerWrapperTemplate() |
---|---|
see | \setContainerRowTemplate() |
string
Template string
string\Formagic_Item_Container
Optional. Defines this template only for a specific container (name or container object).
\Formagic_Renderer_Html
Fluent interfacesetContainerRowTemplate(string $template, string | \Formagic_Item_Container $container) : \Formagic_Renderer_Html
Supported placeholders: - %CONTAINER%: HTML for the subcontainer, including it's wrapper
see | \setContainerLabelTemplate() |
---|---|
see | \setContainerWrapperTemplate() |
string
Template string
string\Formagic_Item_Container
Optional. Defines this template only for a specific container.
\Formagic_Renderer_Html
Fluent interfacesetContainerWrapperTemplate(string $template, string | \Formagic_Item_Container $container) : \Formagic_Renderer_Html
Available placeholders: - %ROWS%: Rendered rows as HTML, including row wrapper - %ATTRIBUTES%: Assembled attributes string as HTML - %LABEL%: Rendered container label as HTML
see | \setContainerLabelTemplate() |
---|---|
see | \setContainerRowTemplate() |
string
Template string
string\Formagic_Item_Container
Optional. Defines this template only for a specific container.
\Formagic_Renderer_Html
Fluent interfacesetErrorClass(string $errorClass) : \Formagic_Renderer_Html
This css class is per default added to the label and error list tag of items that did not pass validation.
string
New error class
\Formagic_Renderer_Html
Fluent interfacesetFormWrapperTemplate(string $template) : \Formagic_Renderer_Html
Available placeholders: - %ACTION%: Form action string - %METHOD%: Form method string - %ATTRIBUTES%: Assembled tag attributes string - %HIDDENS%: Rendered hidden inputs - %CONTAINER%: Rendered HTML of item holder container
string
Template string
\Formagic_Renderer_Html
Fluent interfacesetItemErrorTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
Available placeholders: - %ERRORMESSAGE%: Message string returned by violated rule
string
Template string
string\Formagic_Item_Abstract
Optional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_Html
Fluent interfacesetItemErrorWrapperTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
Supported placeholders: - %ERRORS%: Rendered list of item errors
string
Template string
string\Formagic_Item_Abstract
Optional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_Html
Fluent interfacesetItemLabelTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
Available placeholders: - %LABEL%: Label string defined for item - %ID%: Value of Item's HTML ID attribute - %MANDATORYMARKER%: Marker for items with mandatory rule
see | \setItemRowTemplate() |
---|
string
Template string
string\Formagic_Item_Abstract
Optional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_Html
Fluent interfacesetItemRowTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
Available placeholders: - %LABEL%: Item label string - %ERROR%: Assembled error list (HTML) - %ERRORCLASS%: CSS class attribute with error class (eg. ' class="formagicError"') - %INPUT%: Input HTML
see | \setItemLabelTemplate() |
---|---|
see | \setItemErrorTemplate() |
string
Template string
string\Formagic_Item_Abstract
Optional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_Html
Fluent interfacesetMandatoryMarkerTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
_addHiddenItem(Formagic_Item_Hidden $item)
_getContainerLabel(Formagic_Item_Container $container) : string
Returns empty string if no container label is defined.
string
Container label and template string_getErrorProperties(Formagic_Item_Abstract $item) : array
Returns empty array if item validated ok.
\Formagic_Item_Abstract
array
Error list and class attribute. Example: array( ' - Please enter a value.
', ' class="formagicError"')
_getItemLabel(Formagic_Item_Abstract $item) : string
Returns a non-breakin-space HTML entity if no item label is provided.
string
Item label and template_renderContainer(Formagic_Item_Container $container) : string
_setTemplate(array $templateArray, string $template, string | \Formagic_Item_Abstract $item)
array
Template pool new template is to be added to
string
New template string
string\Formagic_Item_Abstract
_getTemplate(array $templateArray, string | \Formagic_Item_Abstract $item) : string
array
Pool of templates to choose from.
string\Formagic_Item_Abstract
string
Template string$_containerLabelTemplate : array
$_containerRowTemplate : array
$_containerWrapperTemplate : array
$_errorClass : string
$_formWrapperTemplate : array
$_hiddenString : string
$_itemErrorTemplate : array
$_itemErrorWrapperTemplate : array
$_itemLabelTemplate : array
$_itemRowTemplate : array
$_mandatoryMarkerTemplate : array