芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/public_html/cepali/blocks/starredcourses/block_starredcourses.php
. /** * Starred courses block. * * @package block_starredcourses * @copyright 2018 Simey Lameze
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Starred courses block definition class. * * @package block_starredcourses * @copyright 2018 Simey Lameze
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_starredcourses extends block_base { /** * Initialises the block. * * @return void */ public function init() { $this->title = get_string('pluginname', 'block_starredcourses'); } /** * Gets the block contents. * * @return string The block HTML. */ public function get_content() { if ($this->content !== null) { return $this->content; } $renderable = new \block_starredcourses\output\main(); $renderer = $this->page->get_renderer('block_starredcourses'); $this->content = (object) [ 'text' => $renderer->render($renderable), 'footer' => '' ]; return $this->content; } /** * Locations where block can be displayed. * * @return array */ public function applicable_formats() { return array('my' => true); } }