__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_ContainerOptional. Returns a template defined for one specific container.
stringTemplate stringgetContainerRowTemplate(string | \Formagic_Item_Container $container) : string
string\Formagic_Item_ContainerOptional. Returns a template defined for one specific container.
stringTemplate stringgetContainerWrapperTemplate(string $container) : string
stringOptional. Returns a template defined for one specific item with name $name.
stringTemplate stringgetFormWrapperTemplate() : string
stringTemplate stringgetItemErrorTemplate(string | \Formagic_Item_Abstract $item) : string
stringTemplate stringgetItemErrorWrapperTemplate(string | \Formagic_Item_Abstract $item) : string
stringTemplate stringgetItemLabelTemplate(string | \Formagic_Item_Abstract $item) : string
stringTemplate stringgetItemRowTemplate(string | \Formagic_Item_Abstract $item) : string
stringTemplate stringgetMandatoryMarkerTemplate(string | \Formagic_Item_Abstract $item) : string
stringTemplate stringgetTranslator() : \Formagic_Translator
\Formagic_TranslatorTranslator objectrender(Formagic $form) : string
setContainerLabelTemplate(string $template, string | \Formagic_Item_Container $container) : \Formagic_Renderer_Html
Available placeholders: - %LABEL%: Label string
| see | \setContainerWrapperTemplate() |
|---|---|
| see | \setContainerRowTemplate() |
stringTemplate string
string\Formagic_Item_ContainerOptional. Defines this template only for a specific container (name or container object).
\Formagic_Renderer_HtmlFluent 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() |
stringTemplate string
string\Formagic_Item_ContainerOptional. Defines this template only for a specific container.
\Formagic_Renderer_HtmlFluent 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() |
stringTemplate string
string\Formagic_Item_ContainerOptional. Defines this template only for a specific container.
\Formagic_Renderer_HtmlFluent 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.
stringNew error class
\Formagic_Renderer_HtmlFluent 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
stringTemplate string
\Formagic_Renderer_HtmlFluent interfacesetItemErrorTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
Available placeholders: - %ERRORMESSAGE%: Message string returned by violated rule
stringTemplate string
string\Formagic_Item_AbstractOptional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_HtmlFluent interfacesetItemErrorWrapperTemplate(string $template, string | \Formagic_Item_Abstract $item) : \Formagic_Renderer_Html
Supported placeholders: - %ERRORS%: Rendered list of item errors
stringTemplate string
string\Formagic_Item_AbstractOptional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_HtmlFluent 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() |
|---|
stringTemplate string
string\Formagic_Item_AbstractOptional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_HtmlFluent 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() |
stringTemplate string
string\Formagic_Item_AbstractOptional. Defines this template only for a specific item (name or item object).
\Formagic_Renderer_HtmlFluent 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.
stringContainer label and template string_getErrorProperties(Formagic_Item_Abstract $item) : array
Returns empty array if item validated ok.
\Formagic_Item_Abstract
arrayError 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.
stringItem label and template_renderContainer(Formagic_Item_Container $container) : string
_setTemplate(array $templateArray, string $template, string | \Formagic_Item_Abstract $item)
arrayTemplate pool new template is to be added to
stringNew template string
string\Formagic_Item_Abstract
_getTemplate(array $templateArray, string | \Formagic_Item_Abstract $item) : string
arrayPool of templates to choose from.
string\Formagic_Item_Abstract
stringTemplate string$_containerLabelTemplate : array
$_containerRowTemplate : array
$_containerWrapperTemplate : array
$_errorClass : string
$_formWrapperTemplate : array
$_hiddenString : string
$_itemErrorTemplate : array
$_itemErrorWrapperTemplate : array
$_itemLabelTemplate : array
$_itemRowTemplate : array
$_mandatoryMarkerTemplate : array