StaticSelectElement
class StaticSelectElement extends SelectElement
Traits
Properties
| protected string | $actionId | An identifier for this action. |
from SelectElement |
| protected PlainTextOnlyTextObject|null | $placeholder | A plain_text only text object that defines the placeholder text shown on the menu. |
from SelectElement |
| protected bool|null | $focusOnLoad | Indicates whether the element should automatically gain focus when the view loads. |
from SelectElement |
Methods
Set whether the element should automatically gain focus when the view loads.
Get the instance as an array.
Create a new static select element instance.
Add an option to the select element.
Set the default selected option for the select element.
Details
in
SelectElement at line 42
SelectElement
id(string $id)
Set the action ID for the select.
in
SelectElement at line 56
SelectElement
placeholder(string $text)
Set the placeholder text.
in
SelectElement at line 66
SelectElement
focus(bool $focus = true)
Set whether the element should automatically gain focus when the view loads.
at line 64
array
toArray()
Get the instance as an array.
at line 30
__construct(string|null $text = null)
Create a new static select element instance.
at line 38
StaticSelectElement
addOption(string $text, string $value)
Add an option to the select element.
at line 48
StaticSelectElement
initialOption(string $value)
Set the default selected option for the select element.