Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_privacy\output\exported_navigation_page Class Reference

Class containing the navigation renderable. More...

Inheritance diagram for core_privacy\output\exported_navigation_page:
renderable templatable

Public Member Functions

 __construct (\stdClass $tree)
 Constructor.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 

Protected Member Functions

 create_navigation (\stdClass $tree)
 Creates the navigation list html.
 

Protected Attributes

boolean $firstelement = true
 $firstelement This is used to create unique classes for the first elements in the navigation tree.
 
array $tree
 $tree Full tree in multidimensional form.
 

Detailed Description

Class containing the navigation renderable.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_privacy\output\exported_navigation_page::__construct ( \stdClass $tree)

Constructor.

Parameters
stdClass$treeFull tree to create navigation out of.

Member Function Documentation

◆ create_navigation()

core_privacy\output\exported_navigation_page::create_navigation ( \stdClass $tree)
protected

Creates the navigation list html.

Why this and not a template? My attempts at trying to get a recursive template working failed.

Parameters
stdClass$treeFull tree to create navigation out of.
Return values
stringnavigation html.

◆ export_for_template()

core_privacy\output\exported_navigation_page::export_for_template ( renderer_base $output)

Export this data so it can be used as the context for a mustache template.

Parameters
renderer_base$output
Return values
arraynavigation data for the template.

Implements templatable.


The documentation for this class was generated from the following file: