Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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. More...
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template. More...
 

Protected Member Functions

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

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: