|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| get_plugins ($disablecache=false) | |
| get_subplugins ($disablecache=false) | |
| get_parent_of_subplugin ($subplugintype) | |
| plugin_name ($plugin) | |
| plugintype_name_plural ($type) | |
| get_plugin_info ($component) | |
| other_plugins_that_require ($component) | |
| are_dependencies_satisfied ($dependencies) | |
| all_plugins_ok ($moodleversion) | |
Static Public Member Functions | |
| static | instance () |
| static | is_deleted_standard_plugin ($type, $name) |
| static | standard_plugins_list ($type) |
Data Fields | |
| const | PLUGIN_SOURCE_STANDARD = 'std' |
| const | PLUGIN_SOURCE_EXTENSION = 'ext' |
| const | PLUGIN_STATUS_NODB = 'nodb' |
| const | PLUGIN_STATUS_UPTODATE = 'uptodate' |
| const | PLUGIN_STATUS_NEW = 'new' |
| const | PLUGIN_STATUS_UPGRADE = 'upgrade' |
| const | PLUGIN_STATUS_DELETE = 'delete' |
| const | PLUGIN_STATUS_DOWNGRADE = 'downgrade' |
| const | PLUGIN_STATUS_MISSING = 'missing' |
Protected Member Functions | |
| __construct () | |
| __clone () | |
Protected Attributes | |
| $pluginsinfo = null | |
| $subpluginsinfo = null | |
Static Protected Attributes | |
| static | $singletoninstance |
Singleton class providing general plugins management functionality
Definition at line 35 of file pluginlib.php.
| __construct | ( | ) | [protected] |
Direct initiation not allowed, use the factory method self::instance()
Definition at line 69 of file pluginlib.php.

| __clone | ( | ) | [protected] |
Sorry, this is singleton
Definition at line 76 of file pluginlib.php.
| all_plugins_ok | ( | $ | moodleversion | ) |
Checks all dependencies for all installed plugins. Used by install and upgrade.
| int | $moodleversion | the version from version.php. |
Definition at line 277 of file pluginlib.php.


| are_dependencies_satisfied | ( | $ | dependencies | ) |
Check a dependencies list against the list of installed plugins.
| array | $dependencies | compenent name to required version or ANY_VERSION. |
Definition at line 257 of file pluginlib.php.


| get_parent_of_subplugin | ( | $ | subplugintype | ) |
Returns the name of the plugin that defines the given subplugin type
If the given subplugin type is not actually a subplugin, returns false.
| string | $subplugintype | the name of subplugin type, eg. workshopform or quiz |
Definition at line 167 of file pluginlib.php.


| get_plugin_info | ( | $ | component | ) |
| string | $component | frankenstyle component name. |
Definition at line 224 of file pluginlib.php.


| get_plugins | ( | $ | disablecache = false | ) |
Returns a tree of known plugins and information about them
| bool | $disablecache | force reload, cache can be used otherwise |
Definition at line 101 of file pluginlib.php.


| get_subplugins | ( | $ | disablecache = false | ) |
Returns list of plugins that define their subplugins and the information about them from the db/subplugins.php file.
At the moment, only activity modules can define subplugins.
| bool | $disablecache | force reload, cache can be used otherwise |
Definition at line 136 of file pluginlib.php.


| static instance | ( | ) | [static] |
Factory method for this class
Definition at line 84 of file pluginlib.php.
| static is_deleted_standard_plugin | ( | $ | type, |
| $ | name | ||
| ) | [static] |
Defines a list of all plugins that were originally shipped in the standard Moodle distribution, but are not anymore and are deleted during upgrades.
The main purpose of this list is to hide missing plugins during upgrade.
| string | $type | plugin type |
| string | $name | plugin name |
Definition at line 304 of file pluginlib.php.

| other_plugins_that_require | ( | $ | component | ) |
Get a list of any other pluings that require this one.
| string | $component | frankenstyle component name. |
Definition at line 239 of file pluginlib.php.


| plugin_name | ( | $ | plugin | ) |
Returns a localized name of a given plugin
| string | $plugin | name of the plugin, eg mod_workshop or auth_ldap |
Definition at line 186 of file pluginlib.php.


| plugintype_name_plural | ( | $ | type | ) |
Returns a localized name of a plugin type in plural form
Most plugin types define their names in core_plugin lang file. In case of subplugins, we try to ask the parent plugin for the name. In the worst case, we will return the value of the passed $type parameter.
| string | $type | the type of the plugin, e.g. mod or workshopform |
Definition at line 201 of file pluginlib.php.


| static standard_plugins_list | ( | $ | type | ) | [static] |
Defines a white list of all plugins shipped in the standard Moodle distribution
| string | $type |
Definition at line 322 of file pluginlib.php.

$pluginsinfo = null [protected] |
Definition at line 60 of file pluginlib.php.
$singletoninstance [static, protected] |
Definition at line 58 of file pluginlib.php.
$subpluginsinfo = null [protected] |
Definition at line 62 of file pluginlib.php.
| const PLUGIN_SOURCE_EXTENSION = 'ext' |
the plugin is added extension
Definition at line 40 of file pluginlib.php.
| const PLUGIN_SOURCE_STANDARD = 'std' |
the plugin is shipped with standard Moodle distribution
Definition at line 38 of file pluginlib.php.
| const PLUGIN_STATUS_DELETE = 'delete' |
the standard plugin is about to be deleted
Definition at line 51 of file pluginlib.php.
| const PLUGIN_STATUS_DOWNGRADE = 'downgrade' |
the version at the disk is lower than the one already installed
Definition at line 53 of file pluginlib.php.
| const PLUGIN_STATUS_MISSING = 'missing' |
the plugin is installed but missing from disk
Definition at line 55 of file pluginlib.php.
| const PLUGIN_STATUS_NEW = 'new' |
the plugin is about to be installed
Definition at line 47 of file pluginlib.php.
| const PLUGIN_STATUS_NODB = 'nodb' |
the plugin uses neither database nor capabilities, no versions
Definition at line 43 of file pluginlib.php.
| const PLUGIN_STATUS_UPGRADE = 'upgrade' |
the plugin is about to be upgraded
Definition at line 49 of file pluginlib.php.
| const PLUGIN_STATUS_UPTODATE = 'uptodate' |
the plugin is up-to-date
Definition at line 45 of file pluginlib.php.