]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-21148 plugin renderers now redirect calls to core renderer, credit goes to anybod...
authorPetr Skoda <skodak@moodle.org>
Thu, 17 Dec 2009 14:54:04 +0000 (14:54 +0000)
committerPetr Skoda <skodak@moodle.org>
Thu, 17 Dec 2009 14:54:04 +0000 (14:54 +0000)
lib/outputrenderers.php
mod/lesson/renderer.php

index 4352704067751f8d0fffdc14a72e3af5cd935ea4..02ada10bba08e86f6ac8e5b7dcbf4b3ca93d07b0 100644 (file)
@@ -222,6 +222,22 @@ class plugin_renderer_base extends renderer_base {
         $this->output = $page->get_renderer('core');
         parent::__construct($page);
     }
+
+    /**
+     * Magic method used to pass calls otherwise meant for the standard renderer
+     * to it to ensure we don't go causing unnessecary greif.
+     *
+     * @param string $method
+     * @param array $arguments
+     * @return mixed
+     */
+    public function __call($method, $arguments) {
+        if (method_exists($this->output, $method)) {
+            return call_user_func_array(array($this->output, $method), $arguments);
+        } else {
+            throw new coding_exception('Unknown method called against '.__CLASS__.' :: '.$method);
+        }
+    }
 }
 
 /**
index b531fc6dd3124ce3f3921d75176ad34896922a3b..e554b4ed7a5ed7e0202957351c294c117fa1d49e 100644 (file)
  **/
 
 class mod_lesson_renderer extends plugin_renderer_base {
-    /**
-     * Magic method used to pass calls otherwise meant for the standard renderer
-     * to it to ensure we don't go causing unnessecary greif.
-     *
-     * @param string $method
-     * @param array $arguments
-     * @return mixed
-     */
-    public function __call($method, $arguments) {
-        if (method_exists($this->output, $method)) {
-            return call_user_func_array(array($this->output, $method), $arguments);
-        } else {
-            throw new coding_exception('Unknown method called against '.__CLASS__.' :: '.$method);
-        }
-    }
-
     /**
      * Returns the header for the lesson module
      *