phpDocumentor

Option extends AbstractEventRaisingEntity

Class Option

Table of Contents

$details  : OptionDetails
$id  : OptionId
$newValues  : NewOptionValues
$raisedEvents  : array<string|int, object>
$sortOrder  : int
$type  : OptionType
$values  : OptionValues
addNewValues()  : void
Adds a new value to this option.
adminLabel()  : string
Returns the admin label of the option for a given language code.
changeDetails()  : void
Updates the details of this option.
changeSortOrder()  : void
Updates the sort order of this option.
changeType()  : void
Updates the type of this option.
changeValues()  : void
Updates already stored values of this option.
create()  : Option
description()  : string
Returns the description of the option for a given language code.
id()  : int
Returns the ID of the option.
label()  : string
Returns the label of the option for a given language code.
newValues()  : NewOptionValues
Returns the new (not stored) values of the option.
releaseEvents()  : array<string|int, object>
removeValues()  : void
Removes already stored values from this option.
sortOrder()  : int
Returns the sort order of the option.
toArray()  : array<string|int, mixed>
Returns the the data of this option as array.
type()  : string
Returns the type of the option.
values()  : OptionValues
Returns the already stored values of the option.
raiseEvent()  : void
__construct()  : mixed
Option constructor.

Properties

$sortOrder

private int $sortOrder

Methods

addNewValues()

Adds a new value to this option.

public addNewValues(NewOptionValue ...$newOptionValues) : void
Parameters
$newOptionValues : NewOptionValue
Return values
void

adminLabel()

Returns the admin label of the option for a given language code.

public adminLabel(string $languageCode) : string
Parameters
$languageCode : string
Return values
string

changeDetails()

Updates the details of this option.

public changeDetails(OptionDetails $newDetails) : void
Parameters
$newDetails : OptionDetails
Return values
void

changeSortOrder()

Updates the sort order of this option.

public changeSortOrder(int $newSortOrder) : void
Parameters
$newSortOrder : int
Return values
void

changeType()

Updates the type of this option.

public changeType(OptionType $newType) : void
Parameters
$newType : OptionType
Return values
void

changeValues()

Updates already stored values of this option.

public changeValues(OptionValue ...$optionValues) : void
Parameters
$optionValues : OptionValue
Return values
void

description()

Returns the description of the option for a given language code.

public description(string $languageCode) : string
Parameters
$languageCode : string
Return values
string

id()

Returns the ID of the option.

public id() : int
Return values
int

label()

Returns the label of the option for a given language code.

public label(string $languageCode) : string
Parameters
$languageCode : string
Return values
string

removeValues()

Removes already stored values from this option.

public removeValues(OptionValueId ...$optionValueIds) : void
Parameters
$optionValueIds : OptionValueId
Return values
void

sortOrder()

Returns the sort order of the option.

public sortOrder() : int
Return values
int

toArray()

Returns the the data of this option as array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

type()

Returns the type of the option.

public type() : string
Return values
string

Search results