class Chapter

This class allows the storage and retrieval of the attributes of a chapter

Properties

private BlockInfo $blocinfo
private int $id
private string $name
private string $label
private string $icon
private bool $collapsible
private array $sections
private bool $displayable

Methods

void
__construct(BlockInfo $blocinfo, int $id)

Constructor of class Chapter

getBlocinfo()

Retrieves the BlockInfo object that contains this chapter

int
getId()

Retrieves the ID of this chapter

void
setId(int $id)

Sets the ID of this chapter

string
getName()

Retrieves the name of this chapter

void
setName(string $name)

Sets the name of this chapter

string
getLabel()

Retrieves the label of this chapter

void
setLabel(string $label)

Sets the label of this chapter

string
getIcon()

Retrieves the icon of this chapter

void
setIcon(string $icon)

Sets the icon of this chapter

bool
isCollapsible()

Retrieves the collapsible attribute of this Chapter object

bool
getCollapsible()

Retrieves the collapsible attribute of this Chapter object

void
setCollapsible(bool $collapsible)

Determines whether this Chapter can be collapsed /expanded or not

array
getSections()

Returns the list of sections contained in this Chapter object

void
setSections(array $sections)

Sets the list of sections contained in this Chapter object

void
addSection(Section $section)

Adds a section to the list of sections contained in this Chapter object

void
removeSection(int $index)

Removes a section from the list of sections contained in this Chapter object

Section|null
getSectionById(int $id)

Retrieves a section by its ID in the sections list of this Chapter object

bool
isDisplayable()

Returns the displayable attribute of this Chapter object

void
setDisplayable(bool $displayable)

Determines whether this Chapter can be displayed or not

Details

at line 112
void __construct(BlockInfo $blocinfo, int $id)

Constructor of class Chapter

Parameters

BlockInfo $blocinfo BlockInfo object that contains this chapter
int $id The chapter ID

Return Value

void

at line 124
BlockInfo getBlocinfo()

Retrieves the BlockInfo object that contains this chapter

Return Value

BlockInfo the BlockInfo object

at line 135
int getId()

Retrieves the ID of this chapter

Return Value

int the chapter id

at line 147
void setId(int $id)

Sets the ID of this chapter

Parameters

int $id Chapter id

Return Value

void

at line 158
string getName()

Retrieves the name of this chapter

Return Value

string the chapter name

at line 170
void setName(string $name)

Sets the name of this chapter

Parameters

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

Return Value

void

at line 181
string getLabel()

Retrieves the label of this chapter

Return Value

string the chapter label

at line 193
void setLabel(string $label)

Sets the label of this chapter

Parameters

string $label Chapter label

Return Value

void

at line 204
string getIcon()

Retrieves the icon of this chapter

Return Value

string the value of icon

at line 216
void setIcon(string $icon)

Sets the icon of this chapter

Parameters

string $icon Absolute or relative URL of an image

Return Value

void

at line 227
bool isCollapsible()

Retrieves the collapsible attribute of this Chapter object

Return Value

bool the value of collapsible

at line 238
bool getCollapsible()

Retrieves the collapsible attribute of this Chapter object

Return Value

bool the value of collapsible

at line 250
void setCollapsible(bool $collapsible)

Determines whether this Chapter can be collapsed /expanded or not

Parameters

bool $collapsible true if this chapter can be collapsed /expanded, false otherwise

Return Value

void

at line 261
array getSections()

Returns the list of sections contained in this Chapter object

Return Value

array The list of sections

at line 273
void setSections(array $sections)

Sets the list of sections contained in this Chapter object

Parameters

array $sections The list of sections

Return Value

void

at line 285
void addSection(Section $section)

Adds a section to the list of sections contained in this Chapter object

Parameters

Section $section

Return Value

void

at line 297
void removeSection(int $index)

Removes a section from the list of sections contained in this Chapter object

Parameters

int $index

Return Value

void

at line 309
Section|null getSectionById(int $id)

Retrieves a section by its ID in the sections list of this Chapter object

Parameters

int $id Section id

Return Value

Section|null The section with this ID

at line 325
bool isDisplayable()

Returns the displayable attribute of this Chapter object

Return Value

bool the value of displayable

at line 337
void setDisplayable(bool $displayable)

Determines whether this Chapter can be displayed or not

Parameters

bool $displayable Chapter displayable or not

Return Value

void