class BlockInfo

This class allows the storage and retrieval of the attributes of a block of information (blockinfo)

The blockinfo is an element of the simulation page of the same level as the field group but does not contain any input or output fields. It contains textual information that can be useful to the user in the simulation process. It can be contextualized by showing / hiding it totally or partially using the actions of business rules depending on certain conditions.

Properties

private Panel $panel
private int $id
private string $name
private string $label
private string $display
$popinLink
private array $chapters
private bool $displayable

Methods

void
__construct(Panel $panel, int $id)

Constructor of class BlockInfo

getPanel()

Returns the Panel object that contains this BlockInfo object

int
getId()

Returns the ID of this BlockInfo object

void
setId(int $id)

Sets the ID of this BlockInfo object

string
getName()

Returns the name of this BlockInfo object

void
setName(string $name)

Sets the name of this BlockInfo object

string
getLabel()

Returns the label of this BlockInfo object

void
setLabel(string $label)

Sets the label of this BlockInfo object

string
getDisplay()

Returns the display mode of this BlockInfo object

void
setDisplay(string $display)

Sets the display mode of this BlockInfo object

string
getPopinLink()

Sets the text of the link to display the pop-in (if display is "pop-in")

void
setPopinLink(string $popinLink)

Returns the text of the link to display the pop-in (if display is "pop-in")

array
getChapters()

Returns the list of chapters contained in this BlockInfo object

void
setChapters(array $chapters)

Sets the list of chapters contained in this BlockInfo object

void
addChapter(Chapter $chapter)

Adds a chapter to the list of chapters contained in this BlockInfo object

void
removeChapter(int $index)

Removes a chapter from the list of chapters contained in this BlockInfo object

Chapter|null
getChapterById(int $id)

Retrieves a chapter by its ID in the chapter list of this BlockInfo object

bool
hasCollapsibles()

Searchs if this block of information contains at least one chapter that can be folded / unfolded and returns true or false according to the result of the search.

bool
getCollapsibles()

Searchs if this block of information contains at least one chapter that can be folded / unfolded and returns true or false according to the result of the search.

bool
isDisplayable()

Returns the displayable attribute of this BlockInfo object

bool
getDisplayable()

Returns the displayable attribute of this BlockInfo object

void
setDisplayable(bool $displayable)

Determines whether this BlockInfo can be displayed or not

string
getClass()

Returns the class name of this BlockInfo object

Details

at line 114
void __construct(Panel $panel, int $id)

Constructor of class BlockInfo

Parameters

Panel $panel Panel that contains this blockinfo
int $id Blockinfo id

Return Value

void

at line 126
Panel getPanel()

Returns the Panel object that contains this BlockInfo object

Return Value

Panel The container Panel of this BlockInfo object

at line 137
int getId()

Returns the ID of this BlockInfo object

Return Value

int the value of id

at line 149
void setId(int $id)

Sets the ID of this BlockInfo object

Parameters

int $id Blockinfo id

Return Value

void

at line 160
string getName()

Returns the name of this BlockInfo object

Return Value

string the value of name

at line 172
void setName(string $name)

Sets the name of this BlockInfo object

Parameters

string $name Blockinfo name without spaces or special or accented characters

Return Value

void

at line 183
string getLabel()

Returns the label of this BlockInfo object

Return Value

string the value of label

at line 195
void setLabel(string $label)

Sets the label of this BlockInfo object

Parameters

string $label Blockinfo label

Return Value

void

at line 213
string getDisplay()

Returns the display mode of this BlockInfo object

The possible values are :

  • inline: the content of the BlockInfo object is displayed "online" in the simulation page
  • grouped: the fields of the field set are displayed in a group in the simulation page
  • accordion: the content of the BlockInfo object is displayed in the item of an accordion
  • pop-in: the content of the BlockInfo object is displayed in a pop-in modal window.

Return Value

string The display mode

at line 232
void setDisplay(string $display)

Sets the display mode of this BlockInfo object

The possible values are :

  • inline: the content of the BlockInfo object is displayed "online" in the simulation page
  • grouped: the fields of the field set are displayed in a group in the simulation page
  • accordion: the content of the BlockInfo object is displayed in the item of an accordion
  • pop-in: the content of the BlockInfo object is displayed in a pop-in modal window.

Parameters

string $display The display mode

Return Value

void

Sets the text of the link to display the pop-in (if display is "pop-in")

Return Value

string The text of the link

Returns the text of the link to display the pop-in (if display is "pop-in")

Parameters

string $popinLink The text of the link

Return Value

void

at line 266
array getChapters()

Returns the list of chapters contained in this BlockInfo object

Return Value

array the value of chapters

at line 278
void setChapters(array $chapters)

Sets the list of chapters contained in this BlockInfo object

Parameters

array $chapters Array of Chapter objects

Return Value

void

at line 290
void addChapter(Chapter $chapter)

Adds a chapter to the list of chapters contained in this BlockInfo object

Parameters

Chapter $chapter

Return Value

void

at line 302
void removeChapter(int $index)

Removes a chapter from the list of chapters contained in this BlockInfo object

Parameters

int $index Index of the chapter to remove

Return Value

void

at line 314
Chapter|null getChapterById(int $id)

Retrieves a chapter by its ID in the chapter list of this BlockInfo object

Parameters

int $id Chapter id

Return Value

Chapter|null The chapter with this ID

at line 332
bool hasCollapsibles()

Searchs if this block of information contains at least one chapter that can be folded / unfolded and returns true or false according to the result of the search.

This method is an alias of getCollapsibles.

Return Value

bool true if a collapsible chapter exists, false otherwise

at line 348
bool getCollapsibles()

Searchs if this block of information contains at least one chapter that can be folded / unfolded and returns true or false according to the result of the search.

Return Value

bool true if a collapsible chapter exists, false otherwise

at line 359
bool isDisplayable()

Returns the displayable attribute of this BlockInfo object

Return Value

bool the value of displayable

at line 370
bool getDisplayable()

Returns the displayable attribute of this BlockInfo object

Return Value

bool the value of displayable

at line 382
void setDisplayable(bool $displayable)

Determines whether this BlockInfo can be displayed or not

Parameters

bool $displayable Blockinfo displayable or not

Return Value

void

at line 393
string getClass()

Returns the class name of this BlockInfo object

Return Value

string the class name