Zend\Form\View\Helper\FormCollection
Synopsis
class FormCollection
extends AbstractHelper
{
- // members
- protected bool $shouldWrap;
- protected string $wrapper;
- protected string $labelWrapper;
- protected string $templateWrapper;
- protected string $defaultElementHelper;
- protected AbstractHelper $elementHelper;
- protected AbstractHelper $fieldsetHelper;
- // Inherited members from AbstractHelper
- protected array $booleanAttributes;
- protected array $translatableAttributes;
- protected Doctype $doctypeHelper;
- protected EscapeHtml $escapeHtmlHelper;
- protected EscapeHtmlAttr $escapeHtmlAttrHelper;
- protected array $validGlobalAttributes;
- protected array $validTagAttributes;
- // Inherited members from AbstractTranslatorHelper
- protected TranslatorInterface $translator;
- protected string $translatorTextDomain;
- protected bool $translatorEnabled;
- // Inherited members from AbstractHelper
- protected RendererInterface $view;
- // methods
- public string|FormCollection __invoke()
- public string render()
- public string renderTemplate()
- public FormCollection setShouldWrap()
- public bool shouldWrap()
- public FormCollection setDefaultElementHelper()
- public string getDefaultElementHelper()
- public FormCollection setElementHelper()
- protected AbstractHelper getElementHelper()
- public FormCollection setFieldsetHelper()
- protected FormCollection getFieldsetHelper()
- public string getWrapper()
- public self setWrapper()
- public self setLabelWrapper()
- public string getLabelWrapper()
- public string getTemplateWrapper()
- public self setTemplateWrapper()
- // Inherited methods from AbstractHelper
- public AbstractHelper setDoctype()
- public string getDoctype()
- public AbstractHelper setEncoding()
- public string getEncoding()
- public string createAttributesString()
- public null|string getId()
- public string getInlineClosingBracket()
- protected Doctype getDoctypeHelper()
- protected EscapeHtml getEscapeHtmlHelper()
- protected EscapeHtmlAttr getEscapeHtmlAttrHelper()
- protected array prepareAttributes()
- protected string prepareBooleanAttributeValue()
- // Inherited methods from AbstractTranslatorHelper
- public AbstractTranslatorHelper setTranslator()
- public Translator|null getTranslator()
- public bool hasTranslator()
- public AbstractTranslatorHelper setTranslatorEnabled()
- public bool isTranslatorEnabled()
- public AbstractTranslatorHelper setTranslatorTextDomain()
- public string getTranslatorTextDomain()
- // Inherited methods from AbstractHelper
- public AbstractHelper setView()
- public null|Renderer getView()
Hierarchy
Tasks
Line | Task |
---|---|
265 | Ideally the helper should implement an interface. |
228 | Escape event attributes like AbstractHtmlElement view helper does in htmlAttribs ?? |
Members
protected
- $booleanAttributes
—
array
Standard boolean attributes, with expected values for enabling/disabling - $defaultElementHelper
—
string
The name of the default view helper that is used to render sub elements. - $doctypeHelper — Zend\View\Helper\Doctype
- $elementHelper
—
Zend\Form\View\Helper\AbstractHelper
The view helper used to render sub elements. - $escapeHtmlAttrHelper — Zend\View\Helper\EscapeHtmlAttr
- $escapeHtmlHelper — Zend\View\Helper\EscapeHtml
- $fieldsetHelper
—
Zend\Form\View\Helper\AbstractHelper
The view helper used to render sub fieldsets. - $labelWrapper
—
string
This is the default label-wrapper - $shouldWrap
—
Zend\Form\View\Helper\bool
If set to true, collections are automatically wrapped around a fieldset - $templateWrapper
—
string
Where shall the template-data be inserted into - $translatableAttributes
—
array
Translatable attributes - $translator
—
Zend\I18n\Translator\TranslatorInterface
Translator (optional) - $translatorEnabled
—
Zend\I18n\View\Helper\bool
Whether translator should be used - $translatorTextDomain
—
string
Translator text domain (optional) - $validGlobalAttributes
—
array
Attributes globally valid for all tags - $validTagAttributes
—
array
Attributes valid for the tag represented by this helper - $view
—
Zend\View\Renderer\RendererInterface
View object instance - $wrapper
—
string
This is the default wrapper that the collection is wrapped into
Methods
protected
- getElementHelper() — Retrieve the element helper.
- getFieldsetHelper() — Retrieve the fieldset helper.
public
- __invoke() — Invoke helper as function
- getDefaultElementHelper() — Gets the name of the view helper that should be used to render sub elements.
- getLabelWrapper() — Get the wrapper for the label
- getTemplateWrapper() — Ge the wrapper for the template
- getWrapper() — Get the wrapper for the collection
- render() — Render a collection by iterating through all fieldsets and elements
- renderTemplate() — Only render a template
- setDefaultElementHelper() — Sets the name of the view helper that should be used to render sub elements.
- setElementHelper() — Sets the element helper that should be used by this collection.
- setFieldsetHelper() — Sets the fieldset helper that should be used by this collection.
- setLabelWrapper() — Set the label-wrapper The string will be passed through sprintf with the label as single parameter This defaults to '<legend>%s</legend>'
- setShouldWrap() — If set to true, collections are automatically wrapped around a fieldset
- setTemplateWrapper() — Set the string where the template will be inserted into
- setWrapper() — Set the wrapper for this collection
- shouldWrap() — Get wrapped
Inherited from Zend\Form\View\Helper\AbstractHelper
protected
- getDoctypeHelper() — Retrieve the doctype helper
- getEscapeHtmlAttrHelper() — Retrieve the escapeHtmlAttr helper
- getEscapeHtmlHelper() — Retrieve the escapeHtml helper
- prepareAttributes() — Prepare attributes for rendering
- prepareBooleanAttributeValue() — Prepare a boolean attribute value
public
- createAttributesString() — Create a string of all attribute/value pairs
- getDoctype() — Get value for doctype
- getEncoding() — Get character encoding
- getId() — Get the ID of an element
- getInlineClosingBracket() — Get the closing bracket for an inline tag
- setDoctype() — Set value for doctype
- setEncoding() — Set value for character encoding
Inherited from Zend\I18n\View\Helper\AbstractTranslatorHelper
public
- getTranslator() — Returns translator used in helper
- getTranslatorTextDomain() — Return the translation text domain
- hasTranslator() — Checks if the helper has a translator
- isTranslatorEnabled() — Returns whether translator is enabled and should be used
- setTranslator() — Sets translator to use in helper
- setTranslatorEnabled() — Sets whether translator is enabled and should be used
- setTranslatorTextDomain() — Set translation text domain