Skip to content

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.

View source

Public Properties ​

PropertyDescription
labelstring, null
selectedboolean, null
validboolean
valuestring, null

Public Methods ​

MethodDescription
__construct()Constructor
__toString()
getOptions()Returns the options.
serialize()Returns the object’s serialized value.
setOptions()Sets the options.

getOptions() ​

Returns the options.

View source

Returns ​

craft\fields\data\OptionData[]

setOptions() ​

Sets the options.

View source

Arguments ​