Skip to main content

FormSelect


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

Methods

render

Render a form <select> element from the provided $element

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

Parameters:

ParameterTypeDescription
$element\Laminas\Form\ElementInterface

renderOptions

Render an array of options

public renderOptions(array $options, array $selectedOptions = []): string

Individual options should be of the form:

<code> array( 'value' => 'value', 'label' => 'label', 'disabled' => $booleanFlag, 'selected' => $booleanFlag, ) </code>

Parameters:

ParameterTypeDescription
$optionsarray
$selectedOptionsarrayOption values that should be marked as selected

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