Returns rendered HTML form. Tables are used to place form elements.
| package | Formagic\Renderer |
|---|---|
| author | Florian Sonnenburg |
| since | 0.2.0 First time introduced |
__construct(\Formagic_Translator_Interface $translator = null)
\Formagic_Translator_InterfaceTranslator instance
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
string\Formagic_Item_AbstractOptional. Returns a template defined for one specific item.
stringTemplate stringgetItemErrorWrapperTemplate(string|\Formagic_Item_Abstract $item = '') : string
string\Formagic_Item_AbstractOptional. Returns a template defined for one specific item.
stringTemplate stringgetItemLabelTemplate(string|\Formagic_Item_Abstract $item = '') : string
string\Formagic_Item_AbstractOptional. Returns a template defined for one specific item.
stringTemplate stringgetItemRowTemplate(string|\Formagic_Item_Abstract $item = '') : string
string\Formagic_Item_AbstractOptional. Returns a template defined for one specific item.
stringTemplate stringgetMandatoryMarkerTemplate(string|\Formagic_Item_Abstract $item = '') : string
string\Formagic_Item_AbstractOptional. Returns a template defined for one specific item.
stringTemplate stringgetTranslator() : \Formagic_Translator_Interface
\Formagic_Translator_InterfaceTranslator objectrender(\Formagic $form) : string
| inherited_from | \Formagic_Renderer_Interface::render() |
|---|
\FormagicFormagic object to be rendered.
stringThe rendered HTML stringsetContainerLabelTemplate(string $template, string|\Formagic_Item_Container $container = '') : \Formagic_Renderer_Html
setContainerRowTemplate(string $template, string|\Formagic_Item_Container $container = '') : \Formagic_Renderer_Html
setContainerWrapperTemplate(string $template, string|\Formagic_Item_Container $container = '') : \Formagic_Renderer_Html
Available placeholders:
| see | |
|---|---|
| see |
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:
stringTemplate string
\Formagic_Renderer_HtmlFluent interfacesetItemErrorTemplate(string $template, string|\Formagic_Item_Abstract $item = '') : \Formagic_Renderer_Html
Available placeholders:
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:
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:
| see |
|---|
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:
| see | |
|---|---|
| see |
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
stringTemplate string
string\Formagic_Item_AbstractOptional. Item this template is to be defined for.
\Formagic_Renderer_HtmlFluent interface_addHiddenItem(\Formagic_Item_Hidden $item)
\Formagic_Item_HiddenHidden item to be rendered.
_getContainerLabel(\Formagic_Item_Container $container) : string
Returns empty string if no container label is defined.
\Formagic_Item_ContainerContainer item
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.
\Formagic_Item_AbstractInput item
stringItem label and template_renderContainer(\Formagic_Item_Container $container) : string
\Formagic_Item_ContainerContainer to be rendererd
stringHTML 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
array('' => '')$_containerRowTemplate : array
array('' => '
%CONTAINER%
')$_containerWrapperTemplate : array
array('' => '
%ROWS%
')$_errorClass : string
'formagicError'$_formWrapperTemplate : array
'
'$_hiddenString : string
''$_itemErrorTemplate : array
array('' => '%ERRORMESSAGE% ')$_itemErrorWrapperTemplate : array
array('' => '%ERRORS%
')$_itemLabelTemplate : array
array('' => '')$_itemRowTemplate : array
array('' => '
%LABEL%
%ERROR%
%INPUT%
')$_mandatoryMarkerTemplate : array
array('' => ' *')$_translator : \Formagic_Translator_Interface