From 897e902bbcba316735cef67b1a8ccdc4766bd494 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Mon, 4 Jan 2010 14:40:34 +0000 Subject: [PATCH] MDL-20204 improved pix docs --- lib/outputrenderers.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 42a04873c8..fa10c82bae 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -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') { -- 2.39.5