ChoiceGroup
class ChoiceGroup
This class allows the storage and retrieval of the attributes of a group of choices
The list of choices of a choice group can either be defined by extension, or be the result of a query on a data source.
Properties
private string | $label | ||
private array | $choices | ||
private ChoiceSource | $choiceSource |
Methods
Constructor of class ChoiceGroup
Retrieves the label of this group of choices
Sets the label of this group of choices
Returns the list of all the choices that have been defined by extension
Sets the list of all the choices that have been defined by extension
Retrieves a Choice object by its ID
Retrieves the ChoiceSource object of this group of choices
Returns the class name of this ChoiceGroup object
Details
at line 73
void
__construct(string $label)
Constructor of class ChoiceGroup
at line 84
string
getLabel()
Retrieves the label of this group of choices
at line 96
void
setLabel(string $label)
Sets the label of this group of choices
at line 107
array
getChoices()
Returns the list of all the choices that have been defined by extension
at line 119
void
setChoices(array $choices)
Sets the list of all the choices that have been defined by extension
at line 131
void
addChoice(Choice $choice)
Adds a Choice object to the list of choices
at line 143
Choice|null
getChoiceById(int $id)
Retrieves a Choice object by its ID
at line 161
ChoiceSource
getChoiceSource()
Retrieves the ChoiceSource object of this group of choices
The ChoiceSource object contains the columns of the result of the query that populate this group of choices.
at line 175
void
setChoiceSource(ChoiceSource $choiceSource)
Sets the ChoiceSource object of this group of choices
The ChoiceSource object contains the columns of the result of the query that populate this group of choices.
at line 186
string
getClass()
Returns the class name of this ChoiceGroup object