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:
| Parameter | Type | Description |
|---|---|---|
$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:
| Parameter | Type | Description |
|---|---|---|
$options | array | |
$selectedOptions | array | Option values that should be marked as selected |
Inherited methods
prepareAttributes
protected prepareAttributes(array $attributes): array
Parameters:
| Parameter | Type | Description |
|---|---|---|
$attributes | array |
setClassesToElement
protected setClassesToElement(\Laminas\Form\ElementInterface $element, iterable $addClasses = [], iterable $removeClasses = []): \Laminas\Form\ElementInterface
Parameters:
| Parameter | Type | Description |
|---|---|---|
$element | \Laminas\Form\ElementInterface | |
$addClasses | iterable | |
$removeClasses | iterable |