-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathrenderer.php
More file actions
44 lines (38 loc) · 1.59 KB
/
renderer.php
File metadata and controls
44 lines (38 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
// This file is part of Exabis Eportfolio (extension for Moodle)
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
// (c) 2016 GTN - Global Training Network GmbH <office@gtn-solutions.com>.
defined('MOODLE_INTERNAL') || die;
require_once(__DIR__ . '/inc.php');
class block_exaport_renderer extends plugin_renderer_base {
/**
* in moodle33 pix_url was renamed to image_url
*/
public function image_url($imagename, $component = 'moodle') {
if (method_exists(get_parent_class($this), 'image_url')) {
// return call_user_func_array(['parent::class', 'image_url'], func_get_args());
return parent::image_url($imagename, $component);
} else {
// return call_user_func_array(['parent::class', 'pix_url'], func_get_args());
return parent::pix_url($imagename, $component);
}
}
public function get_theme_dir() {
return $this->get_theme_config()->dir;
}
public function get_theme_config() {
return $this->page->theme;
}
}