|
|
bool | $activated = false |
| | indicates that this tab's child is selected
|
| |
|
string | $id |
| | unique id of the tab in this tree, it is used to find selected and/or inactive tabs
|
| |
|
bool | $inactive = false |
| | whether the tab is inactive
|
| |
|
int | $level = 1 |
| | level of tab in the tree, 0 for root (instance of tabtree), 1 for the first row of tabs
|
| |
|
moodle_url string | $link |
| | link
|
| |
|
bool | $linkedwhenselected = false |
| | whether to display a link under the tab name when it's selected
|
| |
|
bool | $selected = false |
| | indicates that this tab is selected
|
| |
|
array | $subtree = [] |
| | stores children tabobjects
|
| |
|
string | $text |
| | text on the tab
|
| |
|
string | $title |
| | title under the link, by defaul equals to text
|
| |
|
| | set_level ($level) |
| | Allows to mark each tab's level in the tree before rendering.
|
| |
| | set_selected ($selected) |
| | Travels through tree and finds the tab to mark as selected, all parents are automatically marked as activated.
|
| |
◆ __construct()
| core\output\tabobject::__construct |
( |
| $id, |
|
|
| $link = null, |
|
|
| $text = '', |
|
|
| $title = '', |
|
|
| $linkedwhenselected = false ) |
Constructor.
- Parameters
-
| string | $id | unique id of the tab in this tree, it is used to find selected and/or inactive tabs |
| string | moodle_url | $link | |
| string | $text | text on the tab |
| string | $title | title under the link, by defaul equals to text |
| bool | $linkedwhenselected | whether to display a link under the tab name when it's selected |
◆ export_for_template()
| core\output\tabobject::export_for_template |
( |
renderer_base | $output | ) |
|
◆ find()
| core\output\tabobject::find |
( |
| $id | ) |
|
Travels through tree and finds a tab with specified id.
- Parameters
-
- Return values
-
◆ set_level()
| core\output\tabobject::set_level |
( |
| $level | ) |
|
|
protected |
Allows to mark each tab's level in the tree before rendering.
- Parameters
-
◆ set_selected()
| core\output\tabobject::set_selected |
( |
| $selected | ) |
|
|
protected |
Travels through tree and finds the tab to mark as selected, all parents are automatically marked as activated.
- Parameters
-
| string | $selected | the id of the selected tab (whatever row it's on), if null marks all tabs as unselected |
- Return values
-
| bool | whether this tab is selected or contains selected tab in its subtree |
The documentation for this class was generated from the following file:
- lib/classes/output/tabobject.php