SingleOptionFieldData

Type
Class
Namespace
craft\fields\data
Inherits
craft\fields\data\SingleOptionFieldData » craft\fields\data\OptionData
Implements
craft\base\Serializable
Since
3.0

Single-select option field data class.

View source

Public Properties

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[]

Signature

public craft\fields\data\OptionData[] getOptions ( )

setOptions()

Sets the options.

View source

Arguments

Signature

public void setOptions ( array $options )