Choice
class Choice
This class allows the storage and retrieval of the attributes of a choice
A choice is a value chosen by a user in a list and assigned to a data item.
Properties
private Data | $data | ||
private int | $id | ||
private string | $value | ||
private string | $label | ||
private bool | $selected |
Methods
Retrieves the ID of this choice
Sets the ID of this choice
Retrieves the value of this choice
Sets the value of this choice
Retrieves the label of this choice
Sets the label of this choice
Retrieves the selected attribute of this Choice object
Retrieves the selected attribute of this Choice object
Determines whether this choice is selected or not
Returns the class name of this Choice object
Details
at line 92
void
__construct(Data $data, int $id, string $value, string $label)
Constructor of class Choice
at line 106
int
getId()
Retrieves the ID of this choice
at line 118
void
setId(int $id)
Sets the ID of this choice
at line 129
Data
getData()
Retrieves the Data object that uses this choice
at line 140
string
getValue()
Retrieves the value of this choice
at line 152
void
setValue(string $value)
Sets the value of this choice
at line 163
string
getLabel()
Retrieves the label of this choice
at line 175
void
setLabel(string $label)
Sets the label of this choice
at line 186
bool
isSelected()
Retrieves the selected attribute of this Choice object
at line 197
bool
getSelected()
Retrieves the selected attribute of this Choice object
at line 209
void
setSelected(bool $selected)
Determines whether this choice is selected or not
at line 220
string
getClass()
Returns the class name of this Choice object