Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Member Functions | List of all members
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. More...
 
static is_valid_preset ($xml)
 Is this XML valid role preset? More...
 
static parse_preset ($xml)
 Parse role preset xml file. More...
 
static send_export_xml ($roleid)
 Send role export xml file to browser. More...
 

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: