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 (opens new window)

# Public Properties

# label

Type
string (opens new window), null (opens new window)
Default value
null

View source (opens new window)

# selected

Type
boolean (opens new window), null (opens new window)
Default value
null

View source (opens new window)

# valid

Type
boolean (opens new window)
Default value
null
Since
3.5.10

View source (opens new window)

# value

Type
string (opens new window), null (opens new window)
Default value
null

View source (opens new window)

# Public Methods

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

# __construct()

Constructor

View source (opens new window)

Arguments

# __toString()

View source (opens new window)

Returns

string (opens new window)

# serialize()

Returns the object’s serialized value.

View source (opens new window)

Returns

mixed – The serialized value