Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_role_preset Class Reference

XML role file manipulation class. More...

Static Public Member Functions

static get_export_xml ($roleid)
 Generate role export xml file.
 
static is_valid_preset ($xml)
 Is this XML valid role preset?
 
static parse_preset ($xml)
 Parse role preset xml file.
 
static send_export_xml ($roleid)
 Send role export xml file to browser.
 

Static Protected Member Functions

static get_node (DOMDocument $dom, $path)
 
static get_node_children (DOMDocument $dom, $path, $tagname)
 
static get_node_children_values (DOMDocument $dom, $path, $tagname)
 
static get_node_value (DOMDocument $dom, $path)
 

Detailed Description

XML role file manipulation class.

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

Member Function Documentation

◆ get_export_xml()

static core_role_preset::get_export_xml ( $roleid)
static

Generate role export xml file.

Parameters
$roleid
Return values
string

◆ is_valid_preset()

static core_role_preset::is_valid_preset ( $xml)
static

Is this XML valid role preset?

Parameters
string$xml
Return values
bool

◆ parse_preset()

static core_role_preset::parse_preset ( $xml)
static

Parse role preset xml file.

Parameters
string$xml
Return values
arrayrole info, null on error

◆ send_export_xml()

static core_role_preset::send_export_xml ( $roleid)
static

Send role export xml file to browser.

Parameters
int$roleid
Return values
voiddoes not return, send the file to output

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