Detailed Description
Definition at line 59 of file lib.php.
Constructor & Destructor Documentation
repository_type constructor object $CFG
- Parameters:
-
| integer | $typename | |
| array | $typeoptions | |
| boolean | $visible | |
| integer | $sortorder | (don't really need set, it will be during create() call) |
Definition at line 127 of file lib.php.
Member Function Documentation
Create a repository type (the type name must not already exist)
- Parameters:
-
- Returns:
- mixed return int if create successfully, return false if any errors object $DB
Definition at line 211 of file lib.php.
Delete a repository_type (general options are removed from config_plugin table, and all instances are deleted) object $DB
- Returns:
- boolean
Definition at line 426 of file lib.php.
Return if the instance is visible in a context TODO: check if the context visibility has been overwritten by the plugin creator (need to create special functions to be overvwritten in repository class)
- Parameters:
-
- Returns:
- boolean
Definition at line 102 of file lib.php.
Return general options
- Returns:
- array the general options
Definition at line 184 of file lib.php.
Return a human readable and user-friendly type name
- Returns:
- string user-friendly type name
Definition at line 176 of file lib.php.
Return order / position of display in the file picker
- Returns:
- integer
Definition at line 200 of file lib.php.
Get the type name (no whitespace) For a human readable name, use get_readablename()
- Returns:
- String the type name
Definition at line 168 of file lib.php.
Return visibility
- Returns:
- boolean
Definition at line 192 of file lib.php.
Change order of the type with its adjacent upper or downer type (database fields are updated) Algorithm details: 1. retrieve all types in an array. This array is sorted by sortorder, and the array keys start from 0 to X (incremented by 1) 2. switch sortorder values of this type and its adjacent type object $DB
- Parameters:
-
| string | $move | "up" or "down" |
retrieve this type into the returned array
retrieve adjacent indice
Definition at line 368 of file lib.php.
Update plugin options into the config_plugin table
- Parameters:
-
- Returns:
- boolean
Definition at line 285 of file lib.php.
1. Change visibility to the value chosen
2. Update the type
- Returns:
- boolean
Definition at line 410 of file lib.php.
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/repository/lib.php