SingleOptionFieldData ​
- Type
- Class
- Namespace
- craft\fields\data
- Inherits
- craft\fields\data\SingleOptionFieldData » craft\fields\data\OptionData
- Implements
- craft\base\Serializable
- Since
- 3.0.0
Single-select option field data class.
Public Properties ​
Property | Description |
---|---|
label | string, null |
selected | boolean |
valid | boolean |
value | string, null |
Public Methods ​
Method | Description |
---|---|
__construct() | Constructor |
__toString() | |
getOptions() | Returns the options. |
serialize() | Returns the object’s serialized value. |
setOptions() | Sets the options. |
getOptions()
​
Returns the options.
Returns ​
craft\fields\data\OptionData[]
setOptions()
​
Sets the options.
Arguments ​
$options
(craft\fields\data\OptionData[])