MDL-21694 documenting get_core_subsystem() purpose plus one typo

This commit is contained in:
David Mudrak 2010-04-22 19:40:22 +00:00
parent 4c14885683
commit 664e45028c
2 changed files with 10 additions and 8 deletions

View File

@ -6820,16 +6820,18 @@ function normalize_component($component) {
}
/**
* List all core subsystems, this is especially useful for get_string()
* and output renderers.
* List all core subsystems and their location
*
* The location is dirroot relative path, NULL means there is no special
* directory for this subsystem.
* This is a whitelist of components that are part of the core and their
* language strings are defined in /lang/en/<<subsystem>>.php. If a given
* plugin is not listed here and it does not have proper plugintype prefix,
* then it is considered as course activity module.
*
* Unfortunately no module may be named like any core subsystem because
* we are still lazy to use proper "mod_" prefix in get_string() and elsewhere.
* The location is dirroot relative path. NULL means there is no special
* directory for this subsystem. If the location is set, the subsystem's
* renderer.php is expected to be there.
*
* @return array of strings - name=>location
* @return array of (string)name => (string|null)location
*/
function get_core_subsystems() {
global $CFG;

View File

@ -152,7 +152,7 @@ abstract class renderer_factory_base implements renderer_factory {
* @return string the name of the standard renderer class for that module.
*/
protected function standard_renderer_classname($component, $subtype = null) {
global $CFG; // needed in incldued files
global $CFG; // needed in included files
// standardize component name ala frankenstyle
list($plugin, $type) = normalize_component($component);