From fa1afe32a169f9d946f000ce283db90d4e6d68c5 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 23 Jul 2009 02:33:58 +0000 Subject: [PATCH] MDL-19077 Fixed PHPdocs, whitespace and all typos I could find, except for a few stub methods which have a TODO tag --- lib/outputlib.php | 450 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 337 insertions(+), 113 deletions(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index 4d7616eea0..0661c28b74 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -54,7 +54,7 @@ interface renderer_factory { * Renderers will normally want to subclass the moodle_renderer_base class. * (However, if you really know what you are doing, you don't have to do that.) * - * There is no separate interface definintion for renderers. The default + * There is no separate interface definition for renderers. The default * moodle_{plugin}_renderer implementation also serves to define the API for * other implementations of the interface, whether or not they subclass it. * For example, {@link custom_corners_core_renderer} does subclass @@ -63,7 +63,7 @@ interface renderer_factory { * of the {@link template_renderer} class, whatever type of renderer you ask * for. This uses the fact that PHP is a dynamic language. * - * A particular plugin can defnie multiple renderers if it wishes, using the + * A particular plugin can define multiple renderers if it wishes, using the * $subtype parameter. For example moodle_mod_workshop_renderer, * moodle_mod_workshop_allocation_manual_renderer etc. * @@ -83,7 +83,7 @@ interface renderer_factory { * (See {@link standard_icon_finder::__construct} for an example.) * * Note that we are planning to change the Moodle icon naming convention before - * the Moodle 2.0 relase. Therefore, this API will probably change. + * the Moodle 2.0 release. Therefore, this API will probably change. * * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -91,24 +91,24 @@ interface renderer_factory { */ interface icon_finder { /** - * Return the URL for an icon indentifed as in pre-Moodle 2.0 code. + * Return the URL for an icon identified as in pre-Moodle 2.0 code. * * Suppose you have old code like $url = "$CFG->pixpath/i/course.gif"; * then old_icon_url('i/course'); will return the equivalent URL that is correct now. * - * @param $iconname the name of the icon. + * @param string $iconname the name of the icon. * @return string the URL for that icon. */ public function old_icon_url($iconname); /** - * Return the URL for an icon indentifed as in pre-Moodle 2.0 code. + * Return the URL for an icon identified as in pre-Moodle 2.0 code. * * Suppose you have old code like $url = "$CFG->modpixpath/$mod/icon.gif"; * then mod_icon_url('icon', $mod); will return the equivalent URL that is correct now. * - * @param $iconname the name of the icon. - * @param $module the module the icon belongs to. + * @param string $iconname the name of the icon. + * @param string $module the module the icon belongs to. * @return string the URL for that icon. */ public function mod_icon_url($iconname, $module); @@ -123,11 +123,11 @@ interface icon_finder { * * There are also some methods and protected variables that are part of the inner * workings of Moodle's themes system. If you are just editing a theme's config.php - * file, you cac just ingore those, and the following information for developers. + * file, you can just ignore those, and the following information for developers. * * Normally, to create an instance of this class, you should use the * {@link theme_config::load()} factory method to load a themes config.php file. - * However, normally you don't need to bother, becuase moodle_page (that is, $PAGE) + * However, normally you don't need to bother, because moodle_page (that is, $PAGE) * will create one for you, accessible as $PAGE->theme. * * @copyright 2009 Tim Hunt @@ -168,7 +168,7 @@ class theme_config { * @var boolean|array Whether and which stylesheets from the parent theme * to use in this theme. (Ignored if parent is null) * - * Possbile values are: + * Possible values are: * false - no parent theme CSS. * true - include all the normal parent theme CSS. Currently this means * array('styles_layout', 'styles_fonts', 'styles_color'). @@ -187,7 +187,7 @@ class theme_config { * the changes in the code. Therefore, your theme is less likely to break * when you upgrade Moodle. * - * Possbile values are: + * Possible values are: * false - no standard theme CSS. * true - include all the main standard theme CSS. Currently this means * array('styles_layout', 'styles_fonts', 'styles_color'). @@ -212,7 +212,7 @@ class theme_config { * This is not necessarily the best choice. * * The plugin CSS is included first, before any theme CSS. To be precise, - * if $standardsheets is true, the the plugin CSS is included with the + * if $standardsheets is true, the plugin CSS is included with the * standard theme's CSS, otherwise if $parentsheets is true, the plugin CSS * will be included with the parent theme's CSS, otherwise the plugin CSS * will be include with this theme's CSS. @@ -257,7 +257,7 @@ class theme_config { * {@link http://cvs.moodle.org/moodle/theme/standard/config.php?view=markup the standard theme config.php file}. * That file also has a good example of how to set this setting. * - * If Moodle encouters a general type of page that is not listed in your theme, + * If Moodle encounters a general type of page that is not listed in your theme, * then it will use the first layout. Therefore, should probably put 'normal' * first in this array. * @@ -291,7 +291,7 @@ class theme_config { *
  • standard:filename for example 'standard:layout-popup.php'. Use * the specified file from the standard theme.
  • * - * To promote conisitency, you are encouraged to call your layout files + * To promote consistency, you are encouraged to call your layout files * layout.php or layout-something.php. * * 'regions' This lists the regions on the page where blocks may appear. For @@ -304,7 +304,7 @@ class theme_config { * 'defaultregion' If the list of regions is non-empty, then you must pick * one of the one of them as 'default'. This has two meanings. First, this is * where new blocks are added. Second, if there are any blocks associated with - * the page, but in non-existant regions, they appear here. (Imaging, for example, + * the page, but in non-existent regions, they appear here. (Imaging, for example, * that someone added blocks using a different theme that used different region * names, and then switched to this theme.) * @@ -382,7 +382,7 @@ class theme_config { * CSS before it is output (for example, to replace certain variable names * with particular values) you can give the name of a function here. * - * There are two functions avaiable that you may wish to use (defined in lib/outputlib.php): + * There are two functions available that you may wish to use (defined in lib/outputlib.php): *