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

Class OptionData

View source

Public Properties

$label

Signature

public string, null $label = null

$selected

Signature

public boolean, null $selected = null

$value

Signature

public string, null $value = null

Public Methods

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

__construct()

Constructor

View source

Arguments

Signature

public void __construct ( \craft\fields\data\string $label = null, \craft\fields\data\string $value = null, \craft\fields\data\bool $selected )

__toString()

Signature

public string __toString ( )

serialize()

Returns the object’s serialized value.

View source

Returns

mixed – The serialized value

Signature

public mixed serialize ( )