MultiValueInterface
API reference › HTML Contracts › Form › MultiValueInterface
Implemented by 1 type
Defines the contract for form controls that accept one or many values.
Applies to controls such as multiple-selection lists and choice lists, where the value is either a scalar or a set of selected values.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
value() abstract | Sets the value attribute. | MultiValueInterface |
Method details
Section titled “Method details”value()
Section titled “value() ”abstract public function value(mixed[]|bool|float|int|string|Stringable|UnitEnum|null $value): staticSets the value attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed[]|Stringable|UnitEnum| | Single value or set of selected values, or null to remove the attribute. |
Returns
static: New instance with the updated value attribute.