Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
navigation_json Class Reference

Public Member Functions

 convert ($branch)
 Turns a branch and all of its children into XML. More...
 
 set_expandable ($expandable)
 Set the expandable items in the array so that we have enough information to attach AJAX events. More...
 

Protected Member Functions

 convert_child ($child, $depth=1)
 Recusively converts a child node and its children to XML for output. More...
 

Protected Attributes

array $expandable = array()
 An array of node keys and types.
 
array $nodetype = array('node','branch')
 An array of different node types.
 

Member Function Documentation

◆ convert()

navigation_json::convert (   $branch)

Turns a branch and all of its children into XML.

Parameters
navigation_node$branch
Return values
stringXML string

◆ convert_child()

navigation_json::convert_child (   $child,
  $depth = 1 
)
protected

Recusively converts a child node and its children to XML for output.

Parameters
navigation_node$childThe child to convert
int$depthPointlessly used to track the depth of the XML structure
Return values
stringJSON

◆ set_expandable()

navigation_json::set_expandable (   $expandable)

Set the expandable items in the array so that we have enough information to attach AJAX events.

Parameters
array$expandable

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