]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20204 improved pix docs
authorPetr Skoda <skodak@moodle.org>
Mon, 4 Jan 2010 14:40:34 +0000 (14:40 +0000)
committerPetr Skoda <skodak@moodle.org>
Mon, 4 Jan 2010 14:40:34 +0000 (14:40 +0000)
lib/outputrenderers.php

index 42a04873c886179c983f52cde500617d28fbb16f..fa10c82bae31aa8e069947127aa0364e99b063ef 100644 (file)
@@ -152,10 +152,26 @@ class renderer_base {
     }
 
     /**
-     * Return the moodle_url for an image
+     * Return the moodle_url for an image.
+     * The exact image location and extension is determined
+     * automatically by searching for gif|png|jpg|jpeg, please
+     * note there can not be diferent images with the different
+     * extension. The imagename is for historical reasons
+     * a relative path name, it may be changed later for core
+     * images. It is recommended to not use subdirectories
+     * in plugin and theme pix directories.
      *
-     * @param string $imagename the name of the image
-     * @param string $component full plugin name
+     * There are three types of images:
+     * 1/ theme images  - stored in theme/mytheme/pix/,
+     *                    use component 'theme'
+     * 2/ core images   - stored in /pix/,
+     *                    overridden via theme/mytheme/pix_core/
+     * 3/ plugin images - stored in mod/mymodule/pix,
+     *                    overridden via theme/mytheme/pix_plugins/mod/mymodule/,
+     *                    example: pix_url('comment', 'mod_glossary')
+     *
+     * @param string $imagename the pathname of the image
+     * @param string $component full plugin name (aka component) or 'theme'
      * @return moodle_url
      */
     public function pix_url($imagename, $component = 'moodle') {