86db09ef |
1 | <?php //$Id$ |
2 | |
3 | class block_html extends block_base { |
4 | |
5 | function init() { |
6 | $this->title = get_string('html', 'block_html'); |
7 | $this->content_type = BLOCK_TYPE_TEXT; |
8 | $this->version = 2004123000; |
9 | } |
10 | |
11 | function specialization() { |
12 | // Does not check if $this->config or $this->config->title |
13 | // are empty because if they are then the user wishes the title |
14 | // of the block to be hidden anyway |
15 | $this->title = $this->config->title; |
16 | } |
17 | |
18 | function instance_allow_multiple() { |
19 | return true; |
20 | } |
21 | |
22 | function get_content() { |
23 | global $CFG; |
24 | require_once($CFG->dirroot .'/lib/weblib.php'); |
25 | if ($this->content !== NULL) { |
26 | return $this->content; |
27 | } |
28 | |
29 | $this->content = new stdClass; |
30 | $this->content->text = $this->config->text; |
31 | $this->content->footer = ''; |
32 | |
33 | return $this->content; |
34 | } |
35 | } |
36 | ?> |