|
| clear_items () |
| Removes all navigation items out of this boost navbar.
|
|
| get_item ($key) |
| Retrieve a single navbar item.
|
|
| get_node_text_and_action (navigation_node $node) |
| Helper function that returns an array of the text and the outputted action url (if exists) for a given navigation node.
|
|
| item_count () |
| Counts all of the navbar items.
|
|
| prepare_nodes_for_boost () |
| Prepares the navigation nodes for use with boost.
|
|
| remove ($itemkey, ?int $itemtype=null) |
| Remove a boostnavbaritem from the boost navbar.
|
|
| remove_duplicate_items () |
| Remove duplicate breadcrumb items.
|
|
| remove_items_that_exist_in_navigation (view $navigationview) |
| Remove breadcrumb items that already exist in a given navigation view.
|
|
| remove_last_item_action () |
| Removes the action from the last item of the boostnavbaritem.
|
|
| remove_no_link_items (bool $removesections=true) |
| Remove items that have no actions associated with them and optionally remove items that are sections.
|
|
|
array | $items = [] |
| The individual items of the navbar.
|
|
moodle_page | $page |
| The current moodle page.
|
|
◆ __construct()
theme_boost\boostnavbar::__construct |
( |
\moodle_page | $page | ) |
|
Takes a navbar object and picks the necessary parts for display.
- Parameters
-
◆ get_item()
theme_boost\boostnavbar::get_item |
( |
| $key | ) |
|
|
protected |
Retrieve a single navbar item.
- Parameters
-
string | int | $key | The identifier of the navbar item to return. |
- Return values
-
breadcrumb_navigation_node|null | The navbar item. |
◆ get_items()
theme_boost\boostnavbar::get_items |
( |
| ) |
|
Get all the boostnavbaritem elements.
- Return values
-
boostnavbaritem[] | Boost navbar items. |
◆ get_node_text_and_action()
Helper function that returns an array of the text and the outputted action url (if exists) for a given navigation node.
- Parameters
-
- Return values
-
◆ get_penultimate_item()
theme_boost\boostnavbar::get_penultimate_item |
( |
| ) |
|
Returns the second last navbar item.
This is for use in the mobile view where we are showing just the second last item in the breadcrumb navbar.
- Return values
-
breakcrumb_navigation_node|null | The second last navigation node. |
◆ item_count()
theme_boost\boostnavbar::item_count |
( |
| ) |
|
|
protected |
Counts all of the navbar items.
- Return values
-
int | How many navbar items there are. |
◆ remove()
theme_boost\boostnavbar::remove |
( |
| $itemkey, |
|
|
?int | $itemtype = null ) |
|
protected |
Remove a boostnavbaritem from the boost navbar.
- Parameters
-
string | int | $itemkey | An identifier for the boostnavbaritem |
int | null | $itemtype | An additional type identifier for the boostnavbaritem (optional) |
◆ remove_duplicate_items()
theme_boost\boostnavbar::remove_duplicate_items |
( |
| ) |
|
|
protected |
Remove duplicate breadcrumb items.
This method looks for breadcrumb items that have identical text and action values and removes the first item.
◆ remove_items_that_exist_in_navigation()
theme_boost\boostnavbar::remove_items_that_exist_in_navigation |
( |
view | $navigationview | ) |
|
|
protected |
Remove breadcrumb items that already exist in a given navigation view.
This method removes the breadcrumb items that have a text => action match in a given navigation view (primary or secondary).
- Parameters
-
view | $navigationview | The navigation view object. |
◆ remove_no_link_items()
theme_boost\boostnavbar::remove_no_link_items |
( |
bool | $removesections = true | ) |
|
|
protected |
Remove items that have no actions associated with them and optionally remove items that are sections.
The only exception is the last item in the list which may not have a link but needs to be displayed.
- Parameters
-
bool | $removesections | Whether section items should be also removed (only applies when they have an action) |
The documentation for this class was generated from the following file:
- theme/boost/classes/boostnavbar.php