Skip to content

Instantly share code, notes, and snippets.

@jondavidjohn
Created October 21, 2011 17:24
Show Gist options
  • Save jondavidjohn/1304407 to your computer and use it in GitHub Desktop.
Save jondavidjohn/1304407 to your computer and use it in GitHub Desktop.
Attempt at new block creation for moodle
<?php
class block_map_works extends block_base {
public function init()
{
$this->title = get_string('map_works', 'block_map_works');
}
public function instance_allow_config()
{
return false;
}
public function applicable_formats()
{
return array('site-index' => true);
}
public function get_content()
{
if ($this->content !== null)
{
return $this->content;
}
$this->content = new stdClass;
$this->content->text = 'The content of our SimpleHTML block!';
$this->content->footer = 'Footer here...';
return $this->content;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment