class DataGroup extends DatasetChild

This class allows the storage and retrieval of the attributes of a data group.

A data group is a subset of data grouped for any reason.

Properties

protected Simulator $simulator from DatasetChild
protected int $id from DatasetChild
protected string $name from DatasetChild
protected string $label from DatasetChild
protected RichText $description from DatasetChild
protected bool $error from DatasetChild
protected array $errorMessages from DatasetChild
protected bool $warning from DatasetChild
protected array $warningMessages from DatasetChild
protected bool $used from DatasetChild
private array $datas

Methods

void
__construct(Simulator $simulator, int $id, string $name)

Constructor of class DataGroup

getSimulator()

Returns the Simulator object that uses this dataset child

int
getId()

Returns the ID of this dataset child.

void
setId(int $id)

Sets the ID of this dataset child.

string
getName()

Returns the name of this dataset child.

void
setName(string $name)

Sets the name of this dataset child.

string
getLabel()

Returns the label of this dataset child.

void
setLabel(string $label)

Sets the label of this dataset child.

getDescription()

Returns the description of this dataset child.

void
setDescription(RichText $description)

Sets the description of this dataset child.

bool
isUsed()

Returns the state of use of this dataset child by the current simulation step

bool
getUsed()

Returns the state of use of this dataset child by the current simulation step

void
setUsed(bool $used)

Sets the state of use of this dataset child by the current simulation step

bool
isError()

Returns the error attribute of this dataset child

bool
getError()

Returns the error attribute of this dataset child

void
setError(bool $error)

Determines whether this dataset child has a issued error or not

array
getErrorMessages()

Returns the list of error messages.

void
setErrorMessages(array $errorMessages)

Sets the list of error messages.

void
addErrorMessage(string $errorMessage)

Adds a message to the list of error messages.

void
removeErrorMessage(int $index)

Removes a message from the list of error messages.

bool
isWarning()

Returns the warning attribute of this dataset child

bool
getWarning()

Returns the warning attribute of this dataset child

void
setWarning(bool $warning)

Determines whether this dataset child has a issued warning or not

array
getWarningMessages()

Returns the list of warning messages.

void
setWarningMessages(array $warningMessages)

Sets the list of warning messages.

void
addWarningMessage(string $warningMessage)

Adds a message to the list of warning messages.

void
removeWarningMessage(int $index)

Removes a message from the list of warning messages.

string
getClass()

Returns the class name of this dataset child. It's either "Data" or "DataGroup".

array
getDatas()

Returns the list of data item of this data group.

void
setDatas(array $datas)

Sets the list of data item of this data group.

void
addData(Data $data)

Adds a data to the list of data item of this data group.

void
removeData(int $index)

Removes a data from the list of data item of this data group.

Data|null
getDataById(int $id)

Retrieves a Data object of this data group by its id.

Data|null
getDataByName(string $name)

Retrieves a Data object of this data group by its name.

Details

at line 59
void __construct(Simulator $simulator, int $id, string $name)

Constructor of class DataGroup

Parameters

Simulator $simulator The Simulator object that uses this dataset child.
int $id The ID of this dataset child.
string $name The name of this dataset child.

Return Value

void

in DatasetChild at line 144
Simulator getSimulator()

Returns the Simulator object that uses this dataset child

Return Value

Simulator The Simulator object

in DatasetChild at line 155
int getId()

Returns the ID of this dataset child.

Return Value

int The ID of this dataset child.

in DatasetChild at line 167
void setId(int $id)

Sets the ID of this dataset child.

Parameters

int $id The ID of this dataset child.

Return Value

void

in DatasetChild at line 178
string getName()

Returns the name of this dataset child.

Return Value

string The name of this dataset child.

in DatasetChild at line 190
void setName(string $name)

Sets the name of this dataset child.

Parameters

string $name The name of this dataset child.

Return Value

void

in DatasetChild at line 201
string getLabel()

Returns the label of this dataset child.

Return Value

string The label of this dataset child.

in DatasetChild at line 213
void setLabel(string $label)

Sets the label of this dataset child.

Parameters

string $label The label of this dataset child.

Return Value

void

in DatasetChild at line 224
RichText getDescription()

Returns the description of this dataset child.

Return Value

RichText The description of this dataset child.

in DatasetChild at line 236
void setDescription(RichText $description)

Sets the description of this dataset child.

Parameters

RichText $description The description of this dataset child.

Return Value

void

in DatasetChild at line 247
bool isUsed()

Returns the state of use of this dataset child by the current simulation step

Return Value

bool true if this dataset child is used (displayed) by the current simulation step, false otherwise

in DatasetChild at line 258
bool getUsed()

Returns the state of use of this dataset child by the current simulation step

Return Value

bool true if this dataset child is used (displayed) by the current simulation step, false otherwise

in DatasetChild at line 270
void setUsed(bool $used)

Sets the state of use of this dataset child by the current simulation step

Parameters

bool $used true if this dataset child is used (displayed) by the current simulation step, false otherwise

Return Value

void

in DatasetChild at line 281
bool isError()

Returns the error attribute of this dataset child

Return Value

bool true if an error was occured, false if not

in DatasetChild at line 292
bool getError()

Returns the error attribute of this dataset child

Return Value

bool true if an error was occured, false if not

in DatasetChild at line 304
void setError(bool $error)

Determines whether this dataset child has a issued error or not

Parameters

bool $error true if this dataset child has a issued error, false otherwise

Return Value

void

in DatasetChild at line 315
array getErrorMessages()

Returns the list of error messages.

Return Value

array The list of error messages

in DatasetChild at line 327
void setErrorMessages(array $errorMessages)

Sets the list of error messages.

Parameters

array $errorMessages The list of error messages

Return Value

void

in DatasetChild at line 339
void addErrorMessage(string $errorMessage)

Adds a message to the list of error messages.

Parameters

string $errorMessage The message to add

Return Value

void

in DatasetChild at line 353
void removeErrorMessage(int $index)

Removes a message from the list of error messages.

Parameters

int $index The index of the message in the list of error messages

Return Value

void

in DatasetChild at line 364
bool isWarning()

Returns the warning attribute of this dataset child

Return Value

bool true if an warning was issued, false if not

in DatasetChild at line 375
bool getWarning()

Returns the warning attribute of this dataset child

Return Value

bool true if an warning was issued, false if not

in DatasetChild at line 387
void setWarning(bool $warning)

Determines whether this dataset child has a issued warning or not

Parameters

bool $warning true if this dataset child has a issued warning, false otherwise

Return Value

void

in DatasetChild at line 398
array getWarningMessages()

Returns the list of warning messages.

Return Value

array The list of warning messages.

in DatasetChild at line 410
void setWarningMessages(array $warningMessages)

Sets the list of warning messages.

Parameters

array $warningMessages The list of warning messages.

Return Value

void

in DatasetChild at line 422
void addWarningMessage(string $warningMessage)

Adds a message to the list of warning messages.

Parameters

string $warningMessage The message to add.

Return Value

void

in DatasetChild at line 436
void removeWarningMessage(int $index)

Removes a message from the list of warning messages.

Parameters

int $index The index of the message in the list of warning messages

Return Value

void

in DatasetChild at line 447
string getClass()

Returns the class name of this dataset child. It's either "Data" or "DataGroup".

Return Value

string The class name

at line 70
array getDatas()

Returns the list of data item of this data group.

Return Value

array The list of data item

at line 82
void setDatas(array $datas)

Sets the list of data item of this data group.

Parameters

array $datas The list of data item

Return Value

void

at line 94
void addData(Data $data)

Adds a data to the list of data item of this data group.

Parameters

Data $data The Data object to add

Return Value

void

at line 106
void removeData(int $index)

Removes a data from the list of data item of this data group.

Parameters

int $index The index of the data in the list of data item

Return Value

void

at line 118
Data|null getDataById(int $id)

Retrieves a Data object of this data group by its id.

Parameters

int $id The data id

Return Value

Data|null The Data object

at line 135
Data|null getDataByName(string $name)

Retrieves a Data object of this data group by its name.

Parameters

string $name The data name

Return Value

Data|null The Data object