27 lines
644 B
PHP
27 lines
644 B
PHP
![]() |
<?php
|
||
|
// Standard GPL and phpdocs
|
||
|
namespace block_timetable\output;
|
||
|
|
||
|
use renderable;
|
||
|
use renderer_base;
|
||
|
use templatable;
|
||
|
use stdClass;
|
||
|
|
||
|
class timetable implements renderable, templatable {
|
||
|
/** @var string $sometext Some text to show how to pass data to a template. */
|
||
|
var $sometext = null;
|
||
|
|
||
|
public function __construct($timetable) {
|
||
|
$this->timetable = $timetable;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Export this data so it can be used as the context for a mustache template.
|
||
|
*
|
||
|
* @return stdClass
|
||
|
*/
|
||
|
public function export_for_template(renderer_base $output) {
|
||
|
return $this->timetable->prepare_output();
|
||
|
}
|
||
|
}
|