Skip to main content

FormCollection

FormCollection


  • Full name: \TwbsHelper\Form\View\Helper\FormCollection
  • Parent class: FormCollection

Properties

fieldsetRegex

protected static $fieldsetRegex
  • This property is static.

legendRegex

protected static $legendRegex
  • This property is static.

options

protected $options

wrapper

This is the default wrapper that the collection is wrapped into

protected string $wrapper

validTagAttributes

Attributes valid for the tag represented by this helper

protected array $validTagAttributes

This should be overridden in extending classes


Methods

__construct

Constructor

public __construct(\TwbsHelper\Options\ModuleOptions $moduleOptions): void

Parameters:

ParameterTypeDescription
$moduleOptions\TwbsHelper\Options\ModuleOptions

render

Render a collection by iterating through all fieldsets and elements

public render(\Laminas\Form\ElementInterface $element): string

Parameters:

ParameterTypeDescription
$element\Laminas\Form\ElementInterface

renderTemplate

Only render a template

public renderTemplate(\Laminas\Form\Element\Collection $collection): string

Parameters:

ParameterTypeDescription
$collection\Laminas\Form\Element\Collection

getElementLayoutClasses

protected getElementLayoutClasses(\Laminas\Form\ElementInterface $element): array

Parameters:

ParameterTypeDescription
$element\Laminas\Form\ElementInterface

renderFieldset

protected renderFieldset(\Laminas\Form\ElementInterface $element): string

Parameters:

ParameterTypeDescription
$element\Laminas\Form\ElementInterface

renderFieldsetLegend

protected renderFieldsetLegend(\Laminas\Form\ElementInterface $element, string $markup): string

Parameters:

ParameterTypeDescription
$element\Laminas\Form\ElementInterface
$markupstring

Inherited methods

prepareAttributes

protected prepareAttributes(array $attributes): array

Parameters:

ParameterTypeDescription
$attributesarray

setClassesToElement

protected setClassesToElement(\Laminas\Form\ElementInterface $element, iterable $addClasses = [], iterable $removeClasses = []): \Laminas\Form\ElementInterface

Parameters:

ParameterTypeDescription
$element\Laminas\Form\ElementInterface
$addClassesiterable
$removeClassesiterable