From ff5265c64fd7e035e04df516cc5e4defd62ef43f Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 17 Dec 2009 14:54:04 +0000 Subject: [PATCH] MDL-21148 plugin renderers now redirect calls to core renderer, credit goes to anybody who did the lesson renderer ;-) --- lib/outputrenderers.php | 16 ++++++++++++++++ mod/lesson/renderer.php | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 4352704067..02ada10bba 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -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); + } + } } /** diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index b531fc6dd3..e554b4ed7a 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -24,22 +24,6 @@ **/ 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 * -- 2.39.5