Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Defines a category in my profile page navigation.

Copyright: 2015 onwards Ankit Agarwal
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 199 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

category:: (6 methods):
  __construct()
  add_node()
  sort_nodes()
  validate_after_order()
  find_nodes_after()
  __get()


Class: category  - X-Ref

Defines a category in my profile page navigation.

__construct($name, $title, $after = null, $classes = null)   X-Ref
Constructor for category class.

param: string $name Category name.
param: string $title category title.
param: null|string $after Name of category after which this category should appear.
param: null|string $classes a list of css classes.

add_node(node $node)   X-Ref
Add a node to this category.

param: node $node node object.

sort_nodes()   X-Ref
Sort nodes of the category in the order in which they should be displayed.


validate_after_order()   X-Ref
Verifies that node with content can come after node with content only . Also verifies the same thing for nodes without
content.


find_nodes_after($node)   X-Ref
Given a node object find all node objects that should appear after it.

param: node $node node object
return: array

__get($prop)   X-Ref
Magic get method.

param: string $prop property to get.
return: mixed