Hi,
i want to show a uploaded file into my custom block.
in get_content() function what i have to write to do that?
currently my get_content() have following things . The underlined code in get_content() function is not working for me
public function get_content() {
if ($this->content !== null) {
return $this->content;
}
$this->content = new stdClass;
$this->content->text = $this->config->text;
$this->content->filepicker = $this->config->filepicker;
$this->content->footer = 'Footer';
return $this->content;
}
and i have a edit form with block settings
protected function specific_definition($mform) {
$mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
$mform->addElement('text', 'config_text', get_string('blockstring', 'block_myblock'));
$mform->setDefault('config_text', 'default value');
$mform->setType('config_text', PARAM_RAW);
$mform->addElement('filepicker', 'config_filepicker', get_string('filename', 'block_myblock'));
}