class FieldSet

This class allows the storage and retrieval of the attributes of a field set.

Fieldset makes it possible to group together fields of the same nature (logical or thematic) thus highlighting the structuring of the information.

The fields of a field set can be arranged conventionally, one below the other or in a grid in which case they are encapsulated in field rows. They can also be placed one after the other in order to form a sentence.

A field set is contained in a panel.

Properties

private Panel $panel
private int $id
private RichText $legend
private string $disposition
private string $display
$popinLink
private bool $displayable
private bool $inputFields
private bool $requiredFields
private array $fields
private array $columns

Methods

void
__construct(Panel $panel, int $id)

Constructor of class FieldSet

getPanel()

Returns the Panel object that contains this field set

int
getId()

Returns the ID of this field set

void
setId(int $id)

Sets the ID of this field set

getLegend()

Returns the legend of this field set

void
setLegend(RichText $legend)

Sets the legend of this field set

string
getDisposition()

Returns the disposition of this field set

void
setDisposition(string $disposition)

Sets the disposition of this field set

string
getDisplay()

Returns the display mode of this field set

void
setDisplay(string $display)

Sets the display mode of this field set

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")

bool
isDisplayable()

Returns the displayable attribute of this FieldSet object

bool
getDisplayable()

Returns the displayable attribute of this FieldSet object

void
setDisplayable(bool $displayable)

Determines whether this field set can be displayed or not

bool
hasInputFields()

Returns the inputFields attribute of this FieldSet object

bool
getInputFields()

Returns the inputFields attribute of this FieldSet object

void
setInputFields(bool $inputFields)

Determines whether this field set contains at least one field entered by the user or not.

bool
hasRequiredFields()

Returns the requiredFields attribute of this FieldSet object

bool
getRequiredFields()

Returns the requiredFields attribute of this FieldSet object

void
setRequiredFields(bool $requiredFields)

Determines whether this field set contains at least one required field entered by the user or not.

array
getFields()

Returns the list of fields or field rows of this field set

void
setFields(array $fields)

Sets the list of fields or field rows of this field set

void
addField(Field|FieldRow $field)

Adds a Field or FieldRow object in the list of fields of this field set.

void
removeField(int $index)

Removes a Field or FieldRow object from the list of fields of this field set.

Field|null
getFieldByPosition(int $position)

Retrieves a Field object by its position in the list of fields of this field set.

FieldRow|null
getFieldRowById(int $id)

Retrieves a FieldRow object by this id.

array
getColumns()

Returns the list of columns (header of a grid) in this field set when the disposition is "grid"

void
setColumns(array $columns)

Sets the list of columns (header of a grid) in this field set when the disposition is "grid"

void
addColumn(Column $column)

Adds a Column object in the list of columns (header of a grid) in this field set.

void
removeColumn(int $index)

Removes a Column object in the list of columns (header of a grid) in this field set.

Column|null
getColumnById(int $id)

Retrieves a Column object by this id.

string
getClass()

Returns the class name of this FieldSet object

Details

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

Constructor of class FieldSet

Parameters

Panel $panel The Panel object that contains this field set
int $id The ID of this field set.

Return Value

void

at line 154
Panel getPanel()

Returns the Panel object that contains this field set

Return Value

Panel The Panel object

at line 165
int getId()

Returns the ID of this field set

Return Value

int The ID of this field set

at line 177
void setId(int $id)

Sets the ID of this field set

Parameters

int $id The ID of this field set

Return Value

void

at line 188
RichText getLegend()

Returns the legend of this field set

Return Value

RichText The legend of this field set

at line 200
void setLegend(RichText $legend)

Sets the legend of this field set

Parameters

RichText $legend The legend of this field set

Return Value

void

at line 217
string getDisposition()

Returns the disposition of this field set

The possible values are :

  • classic: the elements of the form belonging to the field set are arranged in a conventional way, that is, a field preceded by its field label is placed on the line following that of the preceding field
  • grid: form elements belonging to the field set are placed in a table
  • inline: the elements of the form belonging to the field set are arranged on line to form a sentence

Return Value

string The disposition of this field set

at line 235
void setDisposition(string $disposition)

Sets the disposition of this field set

The possible values are :

  • classic: the elements of the form belonging to the field set are arranged in a conventional way, that is, a field preceded by its field label is placed on the line following that of the preceding field
  • grid: form elements belonging to the field set are placed in a table
  • inline: the elements of the form belonging to the field set are arranged on line to form a sentence

Parameters

string $disposition The disposition of this field set

Return Value

void

at line 253
string getDisplay()

Returns the display mode of this field set

The possible values are :

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

Return Value

string The display mode

at line 272
void setDisplay(string $display)

Sets the display mode of this field set

The possible values are :

  • inline: the fields of the field set are displayed "inline" in the simulation page
  • grouped: the fields of the field set are displayed in a group in the simulation page
  • accordion: the fields of the field set are displayed in the item of an accordion
  • pop-in: the fields of the field set are 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 306
bool isDisplayable()

Returns the displayable attribute of this FieldSet object

Return Value

bool true if this field set can be displayed, false otherwise

at line 317
bool getDisplayable()

Returns the displayable attribute of this FieldSet object

Return Value

bool true if this field set can be displayed, false otherwise

at line 329
void setDisplayable(bool $displayable)

Determines whether this field set can be displayed or not

Parameters

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

Return Value

void

at line 340
bool hasInputFields()

Returns the inputFields attribute of this FieldSet object

Return Value

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

at line 351
bool getInputFields()

Returns the inputFields attribute of this FieldSet object

Return Value

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

at line 363
void setInputFields(bool $inputFields)

Determines whether this field set contains at least one field entered by the user or not.

Parameters

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

Return Value

void

at line 374
bool hasRequiredFields()

Returns the requiredFields attribute of this FieldSet object

Return Value

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

at line 385
bool getRequiredFields()

Returns the requiredFields attribute of this FieldSet object

Return Value

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

at line 397
void setRequiredFields(bool $requiredFields)

Determines whether this field set contains at least one required field entered by the user or not.

Parameters

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

Return Value

void

at line 408
array getFields()

Returns the list of fields or field rows of this field set

Return Value

array The list of fields or field rows

at line 420
void setFields(array $fields)

Sets the list of fields or field rows of this field set

Parameters

array $fields The list of fields or field rows

Return Value

void

at line 432
void addField(Field|FieldRow $field)

Adds a Field or FieldRow object in the list of fields of this field set.

Parameters

Field|FieldRow $field The Field or FieldRow Object to be added

Return Value

void

at line 444
void removeField(int $index)

Removes a Field or FieldRow object from the list of fields of this field set.

Parameters

int $index The index of the Field or FieldRow object to be removed

Return Value

void

at line 456
Field|null getFieldByPosition(int $position)

Retrieves a Field object by its position in the list of fields of this field set.

Parameters

int $position The position of the field

Return Value

Field|null the Field object

at line 473
FieldRow|null getFieldRowById(int $id)

Retrieves a FieldRow object by this id.

Parameters

int $id The field row id

Return Value

FieldRow|null The FieldRow object

at line 489
array getColumns()

Returns the list of columns (header of a grid) in this field set when the disposition is "grid"

Return Value

array The list of columns (Column objects)

at line 501
void setColumns(array $columns)

Sets the list of columns (header of a grid) in this field set when the disposition is "grid"

Parameters

array $columns The list of columns (Column objects)

Return Value

void

at line 513
void addColumn(Column $column)

Adds a Column object in the list of columns (header of a grid) in this field set.

Parameters

Column $column The Column object

Return Value

void

at line 525
void removeColumn(int $index)

Removes a Column object in the list of columns (header of a grid) in this field set.

Parameters

int $index index of the Column object in the list of columns

Return Value

void

at line 537
Column|null getColumnById(int $id)

Retrieves a Column object by this id.

Parameters

int $id The column id

Return Value

Column|null The Column object

at line 553
string getClass()

Returns the class name of this FieldSet object

Return Value

string The class name