class Panel

This class allows the storage and retrieval of the attributes of a panel.

A panel is where the informations of a simulation step are displayed.

Information can be organized in one or more panels.

If there are multiple panels, they are displayed as tabs.

The first levels of information in a panel are field sets or blocks of information.

Properties

private Step $step
private int $id
private string $name
private string $label
private array $fieldsets
private bool $displayable

Methods

void
__construct(Step $step, int $id)

Constructor of class Panel

getStep()

Returns the Step object that contains this panel

int
getId()

Returns the id of this panel

void
setId(int $id)

Sets the id of this panel

string
getName()

Returns the name of this panel

void
setName(string $name)

Sets the name of this panel

string
getLabel()

Returns the label of this panel

void
setLabel(string $label)

Sets the label of this panel

array
getFieldSets()

Returns the list of field sets (FieldSet objects) or block of informations (BlockInfo objects) contained in this panel.

void
setFieldSets(array $fieldsets)

Sets the list of field sets (FieldSet objects) or block of informations (BlockInfo objects) contained in this panel.

void
addFieldSet(FieldSet|BlockInfo $fieldset)

Adds a Fieldset or BlockInfo object to the list of field sets or block of informations contained in this panel.

void
removeFieldSet(int $index)

Removes a Fieldset or BlockInfo object from the list of field sets or block of informations contained in this panel.

Fieldset|null
getFieldSetById(int $id)

Retrieves a Fieldset object by its id in the list of field sets contained in this panel.

BlockInfo|null
getBlockInfoById(int $id)

Retrieves a BlockInfo object by its id in the list of blocks of informations contained in this panel.

BlockInfo|Fieldset|null
getBlockById(int $id)

Retrieves the BlockInfo or the Fieldset object by its id in the list of blocks contained in this panel.

bool
isDisplayable()

Returns the displayable attribute of this Panel object

bool
getDisplayable()

Returns the displayable attribute of this Panel object

void
setDisplayable(bool $displayable)

Determines whether this panel can be displayed or not

bool
hasInputFields()

Does this panel contain at least one input field?

bool
hasRequiredFields()

Does this panel contain at least one required input field?

Details

at line 102
void __construct(Step $step, int $id)

Constructor of class Panel

Parameters

Step $step The Step object that contains this panel.
int $id The id of the panel.

Return Value

void

at line 114
Step getStep()

Returns the Step object that contains this panel

Return Value

Step The Step object

at line 125
int getId()

Returns the id of this panel

Return Value

int The id of this panel

at line 137
void setId(int $id)

Sets the id of this panel

Parameters

int $id The id of this panel

Return Value

void

at line 148
string getName()

Returns the name of this panel

Return Value

string The name of this panel

at line 160
void setName(string $name)

Sets the name of this panel

Parameters

string $name The name of this panel

Return Value

void

at line 171
string getLabel()

Returns the label of this panel

Return Value

string The label of this panel

at line 183
void setLabel(string $label)

Sets the label of this panel

Parameters

string $label The label of this panel

Return Value

void

at line 194
array getFieldSets()

Returns the list of field sets (FieldSet objects) or block of informations (BlockInfo objects) contained in this panel.

Return Value

array The list of FieldSet or BlockInfo objects

at line 206
void setFieldSets(array $fieldsets)

Sets the list of field sets (FieldSet objects) or block of informations (BlockInfo objects) contained in this panel.

Parameters

array $fieldsets The list of FieldSet or BlockInfo objects

Return Value

void

at line 218
void addFieldSet(FieldSet|BlockInfo $fieldset)

Adds a Fieldset or BlockInfo object to the list of field sets or block of informations contained in this panel.

Parameters

FieldSet|BlockInfo $fieldset The FieldSet or BlockInfo object

Return Value

void

at line 230
void removeFieldSet(int $index)

Removes a Fieldset or BlockInfo object from the list of field sets or block of informations contained in this panel.

Parameters

int $index The index of the Fieldset or BlockInfo object in the list

Return Value

void

at line 242
Fieldset|null getFieldSetById(int $id)

Retrieves a Fieldset object by its id in the list of field sets contained in this panel.

Parameters

int $id The id of Fieldset object

Return Value

Fieldset|null The Fieldset object

at line 259
BlockInfo|null getBlockInfoById(int $id)

Retrieves a BlockInfo object by its id in the list of blocks of informations contained in this panel.

Parameters

int $id The id of the BlockInfo object

Return Value

BlockInfo|null The BlockInfo object

at line 276
BlockInfo|Fieldset|null getBlockById(int $id)

Retrieves the BlockInfo or the Fieldset object by its id in the list of blocks contained in this panel.

Parameters

int $id The id of the BlockInfo or the Fieldset object

Return Value

BlockInfo|Fieldset|null The BlockInfo or the Fieldset object

at line 292
bool isDisplayable()

Returns the displayable attribute of this Panel object

Return Value

bool true if this panel can be displayed, false otherwise

at line 303
bool getDisplayable()

Returns the displayable attribute of this Panel object

Return Value

bool true if this panel can be displayed, false otherwise

at line 315
void setDisplayable(bool $displayable)

Determines whether this panel can be displayed or not

Parameters

bool $displayable true if this panel can be displayed, false otherwise

Return Value

void

at line 326
bool hasInputFields()

Does this panel contain at least one input field?

Return Value

bool true if this panel contains at least one field entered by the user, false otherwise

at line 342
bool hasRequiredFields()

Does this panel contain at least one required input field?

Return Value

bool true if this panel contains at least one required field entered by the user, false otherwise