Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | List of all members
core_user\output\myprofile\category Class Reference

Defines a category in my profile page navigation. More...

Inheritance diagram for core_user\output\myprofile\category:
renderable

Public Member Functions

 __construct ($name, $title, $after=null, $classes=null)
 Constructor for category class. More...
 
 __get ($prop)
 Magic get method. More...
 
 add_node (node $node)
 Add a node to this category. More...
 
 sort_nodes ()
 Sort nodes of the category in the order in which they should be displayed. More...
 

Protected Member Functions

 find_nodes_after ($node)
 Given a node object find all node objects that should appear after it. More...
 
 validate_after_order ()
 Verifies that node with content can come after node with content only . More...
 

Detailed Description

Defines a category in my profile page navigation.

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

Constructor & Destructor Documentation

◆ __construct()

core_user\output\myprofile\category::__construct (   $name,
  $title,
  $after = null,
  $classes = null 
)

Constructor for category class.

Parameters
string$nameCategory name.
string$titlecategory title.
null | string$afterName of category after which this category should appear.
null | string$classesa list of css classes.

Member Function Documentation

◆ __get()

core_user\output\myprofile\category::__get (   $prop)

Magic get method.

Parameters
string$propproperty to get.
Return values
mixed
Exceptions
coding_exception

◆ add_node()

core_user\output\myprofile\category::add_node ( node  $node)

Add a node to this category.

Parameters
node$nodenode object.
See also
core_user\output\myprofile\tree::add_node()
Exceptions
coding_exception

◆ find_nodes_after()

core_user\output\myprofile\category::find_nodes_after (   $node)
protected

Given a node object find all node objects that should appear after it.

Parameters
node$nodenode object
Return values
array

◆ sort_nodes()

core_user\output\myprofile\category::sort_nodes ( )

Sort nodes of the category in the order in which they should be displayed.

See also
core_user\output\myprofile\tree::sort_categories()
Exceptions
coding_exception

◆ validate_after_order()

core_user\output\myprofile\category::validate_after_order ( )
protected

Verifies that node with content can come after node with content only .

Also verifies the same thing for nodes without content.

Exceptions
coding_exception

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