Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 21... Línea 21...
21
 * @copyright  2016 Frédéric Massart - FMCorz.net
21
 * @copyright  2016 Frédéric Massart - FMCorz.net
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
23
 */
Línea 24... Línea 24...
24
 
24
 
25
namespace core\output;
-
 
Línea 26... Línea 25...
26
defined('MOODLE_INTERNAL') || die();
25
namespace core\output;
27
 
26
 
28
use lang_string;
-
 
29
use moodle_url;
-
 
30
use renderer_base;
27
use lang_string;
31
use renderable;
-
 
Línea 32... Línea 28...
32
use stdClass;
28
use moodle_url;
33
use templatable;
29
use stdClass;
34
 
30
 
35
/**
31
/**
36
 * The chooser renderable class.
32
 * The chooser renderable class.
37
 *
33
 *
38
 * @package    core
34
 * @package    core
39
 * @copyright  2016 Frédéric Massart - FMCorz.net
35
 * @copyright  2016 Frédéric Massart - FMCorz.net
40
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
41
 */
36
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
42
class chooser implements renderable, templatable {
37
 */
43
 
38
class chooser implements renderable, templatable {
44
    /** @var moodle_url The form action URL. */
39
    /** @var moodle_url The form action URL. */
45
    public $actionurl;
40
    public $actionurl;
Línea 83... Línea 78...
83
            $id = $name;
78
            $id = $name;
84
        }
79
        }
85
        $this->params[] = [
80
        $this->params[] = [
86
            'name' => $name,
81
            'name' => $name,
87
            'value' => $value,
82
            'value' => $value,
88
            'id' => $id
83
            'id' => $id,
89
        ];
84
        ];
90
    }
85
    }
Línea 91... Línea 86...
91
 
86
 
92
    /**
87
    /**
Línea 122... Línea 117...
122
        $data->paramname = $this->paramname;
117
        $data->paramname = $this->paramname;
123
        $data->params = $this->params;
118
        $data->params = $this->params;
124
        $data->sesskey = sesskey();
119
        $data->sesskey = sesskey();
125
        $data->title = (string) $this->title;
120
        $data->title = (string) $this->title;
Línea 126... Línea 121...
126
 
121
 
127
        $data->sections = array_map(function($section) use ($output) {
122
        $data->sections = array_map(function ($section) use ($output) {
128
            return $section->export_for_template($output);
123
            return $section->export_for_template($output);
Línea 129... Línea 124...
129
        }, $this->sections);
124
        }, $this->sections);
130
 
125
 
131
        return $data;
-
 
132
    }
126
        return $data;