ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCalendarInboxGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
26{
28 protected string $timezone = 'UTC';
30
36 public function __construct(ilDate $seed_date)
37 {
39 }
40
44 public function initialize(int $a_calendar_presentation_type): void
45 {
46 parent::initialize($a_calendar_presentation_type);
47 $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
48 $this->app_colors = new ilCalendarAppointmentColors($this->user->getId());
49 if ($this->user->getTimeZone()) {
50 $this->timezone = $this->user->getTimeZone();
51 }
52 }
53
54 public function executeCommand(): void
55 {
56 $next_class = $this->ctrl->getNextClass();
57 switch ($next_class) {
58 case 'ilcalendarappointmentgui':
59 $this->ctrl->setReturn($this, '');
60 $this->tabs_gui->setSubTabActive((string) ilSession::get('cal_last_tab'));
61
62 $app = new ilCalendarAppointmentGUI($this->seed, $this->seed, $this->initAppointmentIdFromQuery());
63 $this->ctrl->forwardCommand($app);
64 break;
65
66 case 'ilcalendaragendalistgui':
67 $cal_list = new ilCalendarAgendaListGUI($this->seed);
68 $html = $this->ctrl->forwardCommand($cal_list);
69 // this fixes 0027035 since many methods ilCalendarAppointmentGUI set their own content.
70 if (strlen($html)) {
71 $this->main_tpl->setContent($html);
72 }
73 break;
74
75 default:
76 $cmd = $this->ctrl->getCmd("inbox");
77 $this->$cmd();
78 $this->main_tpl->setContent($this->tpl->get());
79 break;
80 }
81 }
82
83 protected function inbox(): void
84 {
85 $this->tpl = new ilTemplate('tpl.inbox.html', true, true, 'components/ILIAS/Calendar');
86
87 // agenda list
88 $cal_list = new ilCalendarAgendaListGUI($this->seed);
89 $html = $this->ctrl->getHTML($cal_list);
90 $this->tpl->setVariable('CHANGED_TABLE', $html);
91 }
92}
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
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc