ILIAS  release_8 Revision v8.24
class.ilCalendarInboxGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4/*
5 +-----------------------------------------------------------------------------+
6 | ILIAS open source |
7 +-----------------------------------------------------------------------------+
8 | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
9 | |
10 | This program is free software; you can redistribute it and/or |
11 | modify it under the terms of the GNU General Public License |
12 | as published by the Free Software Foundation; either version 2 |
13 | of the License, or (at your option) any later version. |
14 | |
15 | This program is distributed in the hope that it will be useful, |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | GNU General Public License for more details. |
19 | |
20 | You should have received a copy of the GNU General Public License |
21 | along with this program; if not, write to the Free Software |
22 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
23 +-----------------------------------------------------------------------------+
24*/
25
32{
34 protected string $timezone = 'UTC';
36
42 public function __construct(ilDate $seed_date)
43 {
45 }
46
50 public function initialize(int $a_calendar_presentation_type): void
51 {
52 parent::initialize($a_calendar_presentation_type);
53 $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
54 $this->app_colors = new ilCalendarAppointmentColors($this->user->getId());
55 if ($this->user->getTimeZone()) {
56 $this->timezone = $this->user->getTimeZone();
57 }
58 }
59
60 public function executeCommand(): void
61 {
62 $next_class = $this->ctrl->getNextClass();
63 switch ($next_class) {
64 case 'ilcalendarappointmentgui':
65 $this->ctrl->setReturn($this, '');
66 $this->tabs_gui->setSubTabActive((string) ilSession::get('cal_last_tab'));
67
68 $app = new ilCalendarAppointmentGUI($this->seed, $this->seed, $this->initAppointmentIdFromQuery());
69 $this->ctrl->forwardCommand($app);
70 break;
71
72 case 'ilcalendaragendalistgui':
73 $cal_list = new ilCalendarAgendaListGUI($this->seed);
74 $html = $this->ctrl->forwardCommand($cal_list);
75 // this fixes 0027035 since many methods ilCalendarAppointmentGUI set their own content.
76 if (strlen($html)) {
77 $this->main_tpl->setContent($html);
78 }
79 break;
80
81 default:
82 $cmd = $this->ctrl->getCmd("inbox");
83 $this->$cmd();
84 $this->main_tpl->setContent($this->tpl->get());
85 break;
86 }
87 }
88
89 protected function inbox(): void
90 {
91 $this->tpl = new ilTemplate('tpl.inbox.html', true, true, 'Services/Calendar');
92
93 // agenda list
94 $cal_list = new ilCalendarAgendaListGUI($this->seed);
95 $html = $this->ctrl->getHTML($cal_list);
96 $this->tpl->setVariable('CHANGED_TABLE', $html);
97 }
98}
Administrate calendar appointments.
ilCalendarAppointmentColors $app_colors
ilCalendarUserSettings $user_settings
__construct(ilDate $seed_date)
Constructor @access public.
initialize(int $a_calendar_presentation_type)
@inheritDoc
static _getInstanceByUserId(int $a_user_id)
Class for single dates.
static get(string $a_var)
special template class to simplify handling of ITX/PEAR
$app
Definition: cli.php:39
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc