class Profile

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

A profile is a set of pre-defined default values assigned to data. When the user selects a profile, the form data associated with the profile are filled with the predefined values.

Properties

private int $id
private string $name
private string $label
private RichText $description
private array $datas

Methods

void
__construct(int $id, string $name)

Constructor of class Profile

int
getId()

Returns the id of this profile.

void
setId(int $id)

Sets the id of this profile.

string
getName()

Returns the name of this profile.

void
setName(string $name)

Sets the name of this profile.

string
getLabel()

Returns the label of this profile.

void
setLabel(string $label)

Sets the label of this profile.

getDescription()

Returns the description of this profile.

void
setDescription(RichText $description)

Sets the description of this profile.

array
getDatas()

Returns the list of data that are pre-filled by this profile.

void
setDatas(array $datas)

Sets the list of data that are pre-filled by this profile.

void
addData(int $id, string $default = "")

Adds a "data ID/default value" pair to the list of data that are pre-filled by this profile.

void
removeData(int $index)

Removes a "data ID/default value" pair from the list of data that are pre-filled by this profile.

Details

at line 89
void __construct(int $id, string $name)

Constructor of class Profile

Parameters

int $id The id of this profile.
string $name The name of this profile.

Return Value

void

at line 101
int getId()

Returns the id of this profile.

Return Value

int The id of this profile.

at line 113
void setId(int $id)

Sets the id of this profile.

Parameters

int $id The id of this profile.

Return Value

void

at line 124
string getName()

Returns the name of this profile.

Return Value

string The name of this profile.

at line 136
void setName(string $name)

Sets the name of this profile.

Parameters

string $name The name of this profile.

Return Value

void

at line 147
string getLabel()

Returns the label of this profile.

Return Value

string The label of this profile.

at line 159
void setLabel(string $label)

Sets the label of this profile.

Parameters

string $label The label of this profile.

Return Value

void

at line 170
RichText getDescription()

Returns the description of this profile.

Return Value

RichText The description of this profile.

at line 182
void setDescription(RichText $description)

Sets the description of this profile.

Parameters

RichText $description The description of this profile.

Return Value

void

at line 195
array getDatas()

Returns the list of data that are pre-filled by this profile.

The elements of this list are "data ID/default value" pairs.

Return Value

array The list of data.

at line 209
void setDatas(array $datas)

Sets the list of data that are pre-filled by this profile.

The elements of this list are "data ID/default value" pairs.

Parameters

array $datas The list of data.

Return Value

void

at line 222
void addData(int $id, string $default = "")

Adds a "data ID/default value" pair to the list of data that are pre-filled by this profile.

Parameters

int $id The id of the data item.
string $default (default: "") The default value

Return Value

void

at line 234
void removeData(int $index)

Removes a "data ID/default value" pair from the list of data that are pre-filled by this profile.

Parameters

int $index The index of the pair in the list.

Return Value

void