Skip to content

OptionData ​

Type
Class
Namespace
craft\fields\data
Inherits
craft\fields\data\OptionData
Implements
craft\base\Serializable
Extended by
craft\fields\data\SingleOptionFieldData
Since
3.0.0

Class OptionData

View source

Public Properties ​

PropertyDescription
labelstring, null
selectedboolean, null
validboolean
valuestring, null

label ​

Type
string, null
Default value
null

View source

selected ​

Type
boolean, null
Default value
null

View source

valid ​

Type
boolean
Default value
null
Since
3.5.10

View source

value ​

Type
string, null
Default value
null

View source

Public Methods ​

MethodDescription
__construct()Constructor
__toString()
serialize()Returns the object’s serialized value.

__construct() ​

Constructor

View source

Arguments ​

__toString() ​

View source

Returns ​

string

serialize() ​

Returns the object’s serialized value.

View source

Returns ​

mixed – The serialized value