86db09ef |
1 | <?php //$Id$ |
2 | |
3 | class block_html extends block_base { |
4 | |
5 | function init() { |
6 | $this->title = get_string('html', 'block_html'); |
86db09ef |
7 | $this->version = 2004123000; |
8 | } |
9 | |
b959599b |
10 | function applicable_formats() { |
11 | return array('all' => true); |
12 | } |
13 | |
86db09ef |
14 | function specialization() { |
48f7fa4a |
15 | $this->title = isset($this->config->title) ? $this->config->title : get_string('newhtmlblock', 'block_html'); |
86db09ef |
16 | } |
17 | |
18 | function instance_allow_multiple() { |
19 | return true; |
20 | } |
21 | |
22 | function get_content() { |
86db09ef |
23 | if ($this->content !== NULL) { |
24 | return $this->content; |
25 | } |
26 | |
e345909c |
27 | $filteropt = new stdClass; |
28 | $filteropt->noclean = true; |
29 | |
86db09ef |
30 | $this->content = new stdClass; |
e345909c |
31 | $this->content->text = isset($this->config->text) ? format_text($this->config->text, FORMAT_HTML, $filteropt) : ''; |
86db09ef |
32 | $this->content->footer = ''; |
33 | |
e345909c |
34 | unset($filteropt); // memory footprint |
35 | |
86db09ef |
36 | return $this->content; |
37 | } |
38 | } |
39 | ?> |