Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
license_manager Class Reference

Static Public Member Functions

static add ($license)
 Adding a new license type. More...
 
static disable ($license)
 Disable a license. More...
 
static enable ($license)
 Enable a license. More...
 
static get_license_by_shortname ($name)
 Get license record by shortname. More...
 
static get_licenses ($param=null)
 Get license records. More...
 
static install_licenses ()
 Install moodle build-in licenses.
 

Member Function Documentation

◆ add()

static license_manager::add (   $license)
static

Adding a new license type.

Parameters
object$license{ shortname => string a shortname of license, will be refered by files table[required] fullname => string the fullname of the license [required] source => string the homepage of the license type[required] enabled => int is it enabled? version => int a version number used by moodle [required] }

◆ disable()

static license_manager::disable (   $license)
static

Disable a license.

Parameters
string$licensethe shortname of license
Return values
boolean

◆ enable()

static license_manager::enable (   $license)
static

Enable a license.

Parameters
string$licensethe shortname of license
Return values
boolean

◆ get_license_by_shortname()

static license_manager::get_license_by_shortname (   $name)
static

Get license record by shortname.

Parameters
mixed$paramthe shortname of license, or an array
Return values
object

◆ get_licenses()

static license_manager::get_licenses (   $param = null)
static

Get license records.

Parameters
mixed$param
Return values
array

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