| 901 |
ariadna |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace theme_universe_child\output;
|
|
|
4 |
|
|
|
5 |
defined('MOODLE_INTERNAL') || die();
|
|
|
6 |
|
|
|
7 |
use renderable;
|
|
|
8 |
use templatable;
|
|
|
9 |
|
|
|
10 |
class custom_drawer implements renderable, templatable
|
|
|
11 |
{
|
|
|
12 |
|
|
|
13 |
/**
|
|
|
14 |
*
|
|
|
15 |
* @var \stdClass
|
|
|
16 |
*/
|
|
|
17 |
public $data;
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
public function __construct($prevlink, $nextlink, $activitylist = array(), $currentmod, $isMobile = true, $isACoursePage = true, $summary = '', $progreso = 0)
|
|
|
21 |
{
|
|
|
22 |
$this->data = new \stdClass();
|
|
|
23 |
$this->data->prevlink = $prevlink;
|
|
|
24 |
$this->data->nextlink = $nextlink;
|
|
|
25 |
$this->data->activitylist = $activitylist;
|
|
|
26 |
$this->data->currentmod = $currentmod;
|
|
|
27 |
$this->data->isMobile = $isMobile;
|
|
|
28 |
$this->data->isACoursePage = $isACoursePage;
|
|
|
29 |
$this->data->summary = $summary;
|
|
|
30 |
$this->data->progreso = $progreso;
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
/**
|
|
|
34 |
* Export this data so it can be used as the context for a mustache template.
|
|
|
35 |
*
|
|
|
36 |
* @param \renderer_base $output Renderer base.
|
|
|
37 |
* @return \stdClass
|
|
|
38 |
*/
|
|
|
39 |
public function export_for_template(\renderer_base $output)
|
|
|
40 |
{
|
| 903 |
ariadna |
41 |
return $output->render_from_template("theme_universe_child/custom_drawer", $this->data);
|
| 901 |
ariadna |
42 |
}
|
|
|
43 |
}
|