Differences Between: [Versions 400 and 402] [Versions 400 and 403]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 namespace mod_bigbluebuttonbn\output; 18 19 use mod_bigbluebuttonbn\instance; 20 use mod_bigbluebuttonbn\local\helpers\roles; 21 use moodle_url; 22 use renderable; 23 use renderer_base; 24 use stdClass; 25 use templatable; 26 27 /** 28 * Renderable for the instance notification updated message 29 * 30 * @package mod_bigbluebuttonbn 31 * @copyright 2010 onwards, Blindside Networks Inc 32 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 33 * @author Darko Miletic (darko.miletic [at] gmail [dt] com) 34 */ 35 class instance_updated_message implements renderable, templatable { 36 37 /** @var int The activity was created */ 38 const TYPE_CREATED = 0; 39 40 /** @var int The activity was updated */ 41 const TYPE_UPDATED = 1; 42 43 /** 44 * @var instance $instance 45 */ 46 protected $instance; 47 48 /** 49 * Instance updated constructor 50 * 51 * @param instance $instance 52 * @param int $type 53 */ 54 public function __construct(instance $instance, int $type) { 55 $this->instance = $instance; 56 $this->type = $type; 57 } 58 59 /** 60 * Defer to template. 61 * 62 * @param renderer_base $output 63 * @return stdClass 64 */ 65 public function export_for_template(renderer_base $output): stdClass { 66 return (object) [ 67 'is_update' => $this->type === self::TYPE_UPDATED, 68 'is_create' => $this->type === self::TYPE_CREATED, 69 'name' => $this->instance->get_meeting_name(), 70 'link' => $this->instance->get_view_url()->out(), 71 'description' => $this->instance->get_meeting_description(), 72 'openingtime' => $this->instance->get_instance_var('openingtime'), 73 'closingtime' => $this->instance->get_instance_var('closingtime'), 74 ]; 75 } 76 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body