ILIAS  release_8 Revision v8.24
class.ilCalendarWeekGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
28{
29 protected int $num_appointments = 1;
31 protected array $weekdays = array();
32
34 protected array $seed_info = [];
35 protected string $timezone = 'UTC';
37 protected array $colspans = [];
38
39 // config
40 protected int $raster = 15;
41 //setup_calendar
42 protected int $user_id = 0;
43 protected bool $disable_empty;
44 protected bool $no_add;
45
46 public function __construct(ilDate $seed_date)
47 {
49 }
50
51 public function initialize(int $a_calendar_presentation_type): void
52 {
53 parent::initialize($a_calendar_presentation_type); // TODO: Change the autogenerated stub
54 $this->seed_info = (array) $this->seed->get(IL_CAL_FKT_GETDATE, '', 'UTC');
55 $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
56 $this->app_colors = new ilCalendarAppointmentColors($this->user->getId());
57 if ($this->user->getTimeZone()) {
58 $this->timezone = $this->user->getTimeZone();
59 }
60 }
61
62 public function executeCommand(): void
63 {
64 $this->ctrl->saveParameter($this, 'seed');
65 $next_class = $this->ctrl->getNextClass();
66 switch ($next_class) {
67 case "ilcalendarappointmentpresentationgui":
68 $this->ctrl->setReturn($this, "");
69 $gui = ilCalendarAppointmentPresentationGUI::_getInstance($this->seed, (array) $this->getCurrentApp());
70 $this->ctrl->forwardCommand($gui);
71 break;
72 case 'ilcalendarappointmentgui':
73 $this->ctrl->setReturn($this, '');
74 $this->tabs_gui->setSubTabActive((string) ilSession::get('cal_last_tab'));
75
76 // initial date for new calendar appointments
77 $idate = new ilDate($this->initInitialDateFromQuery(), IL_CAL_DATE);
78 $app = new ilCalendarAppointmentGUI($this->seed, $idate, $this->initAppointmentIdFromQuery());
79 $this->ctrl->forwardCommand($app);
80 break;
81
82 default:
83 $time = microtime(true);
84 $cmd = $this->ctrl->getCmd("show");
85 $this->$cmd();
86 $this->main_tpl->setContent($this->tpl->get());
87 break;
88 }
89 }
90
91 public function show(): void
92 {
93 $num_apps = [];
94 $morning_aggr = $this->getMorningAggr();
95 $evening_aggr = $this->user_settings->getDayEnd() * 60;
96
97 $this->tpl = new ilTemplate('tpl.week_view.html', true, true, 'Services/Calendar');
98
100
101 $navigation = new ilCalendarHeaderNavigationGUI($this, $this->seed, ilDateTime::WEEK);
102 $this->tpl->setVariable('NAVIGATION', $navigation->getHTML());
103 $this->setUpCalendar();
104
105 $scheduler = new ilCalendarSchedule(
106 $this->seed,
108 $this->user->getId(),
109 $this->disable_empty
110 );
111 $scheduler->addSubitemCalendars(true);
112 $scheduler->calculate();
113
114 $counter = 0;
115 $hours = null;
116 $all_fullday = array();
117 foreach (ilCalendarUtil::_buildWeekDayList($this->seed, $this->user_settings->getWeekStart())->get() as $date) {
118 $daily_apps = $scheduler->getByDay($date, $this->timezone);
119 if (!$this->view_with_appointments && count($daily_apps)) {
120 $this->view_with_appointments = true;
121 }
122 $hours = $this->parseHourInfo(
123 $daily_apps,
124 $date,
125 $counter,
126 $hours,
127 $morning_aggr,
128 $evening_aggr
129 );
130 $this->weekdays[] = $date;
131
132 $num_apps[$date->get(IL_CAL_DATE)] = count($daily_apps);
133
134 $all_fullday[] = $daily_apps;
135 $counter++;
136 }
137
138 $this->calculateColspans($hours);
139
140 $this->cal_settings = ilCalendarSettings::_getInstance();
141
142 // Table header
143 $counter = 0;
144 foreach (ilCalendarUtil::_buildWeekDayList($this->seed, $this->user_settings->getWeekStart())->get() as $date) {
145 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $date->get(IL_CAL_DATE));
146 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $date->get(IL_CAL_DATE));
147 $this->ctrl->setParameterByClass('ilcalendardaygui', 'seed', $date->get(IL_CAL_DATE));
148
149 if (!$this->no_add) {
150 $this->addAppointmentLink($date);
151 }
152
153 $this->addHeaderDate($date, $num_apps);
154
155 $this->tpl->setCurrentBlock('day_header_row');
156 $this->tpl->setVariable('DAY_COLSPAN', max($this->colspans[$counter], 1));
157 $this->tpl->parseCurrentBlock();
158
159 $counter++;
160 }
161
162 // show fullday events
163 $this->addFullDayEvents($all_fullday);
164
165 //show timed events
166 $this->addTimedEvents($hours, $morning_aggr, $evening_aggr);
167
168 $this->tpl->setVariable("TXT_TIME", $this->lng->txt("time"));
169 }
170
171 protected function showFulldayAppointment(array $a_app): void
172 {
173 $event_tpl = new ilTemplate('tpl.day_event_view.html', true, true, 'Services/Calendar');
174
175 // milestone icon
176 if ($a_app['event']->isMilestone()) {
177 $event_tpl->setCurrentBlock('fullday_ms_icon');
178 $event_tpl->setVariable('ALT_FD_MS', $this->lng->txt("cal_milestone"));
179 $event_tpl->setVariable('SRC_FD_MS', ilUtil::getImagePath("icon_ms.svg"));
180 $event_tpl->parseCurrentBlock();
181 }
182
183 $event_tpl->setCurrentBlock('fullday_app');
184
185 $compl = ($a_app['event']->isMilestone() && $a_app['event']->getCompletion() > 0)
186 ? " (" . $a_app['event']->getCompletion() . "%)"
187 : "";
188
189 $shy = $this->getAppointmentShyButton($a_app['event'], (string) $a_app['dstart'], "");
190
191 $title = $shy . $compl;
192
193 $event_tpl->setVariable('EVENT_CONTENT', $title);
194
195 $color = $this->app_colors->getColorByAppointment($a_app['event']->getEntryId());
196 $font_color = ilCalendarUtil::calculateFontColor($color);
197
198 $event_tpl->setVariable('F_APP_BGCOLOR', $color);
199 $event_tpl->setVariable('F_APP_FONTCOLOR', $font_color);
200
201 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
202 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
203 $event_tpl->setVariable(
204 'F_APP_EDIT_LINK',
205 $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'edit')
206 );
207
208 if ($event_html_by_plugin = $this->getContentByPlugins($a_app['event'], $a_app['dstart'], $title, $event_tpl)) {
209 $event_html = $event_html_by_plugin;
210 } else {
211 $event_tpl->parseCurrentBlock();
212 $event_html = $event_tpl->get();
213 }
214
215 $this->tpl->setCurrentBlock("content_fd");
216 $this->tpl->setVariable("CONTENT_EVENT_FD", $event_html);
217 $this->tpl->parseCurrentBlock();
218
219 $this->num_appointments++;
220 }
221
222 protected function showAppointment(array $a_app): void
223 {
224 $time = '';
225 $event_tpl = new ilTemplate('tpl.week_event_view.html', true, true, 'Services/Calendar');
226
228
229 $this->tpl->setCurrentBlock('not_empty');
230
231 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
232 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
233
234 $color = $this->app_colors->getColorByAppointment($a_app['event']->getEntryId());
235 $style = 'background-color: ' . $color . ';';
236 $style .= ('color:' . ilCalendarUtil::calculateFontColor($color));
237 $td_style = $style;
238
239 if (!$a_app['event']->isFullDay()) {
240 $time = $this->getAppointmentTimeString($a_app['event']);
241
242 $td_style .= $a_app['event']->getPresentationStyle();
243 }
244
245 $shy = $this->getAppointmentShyButton($a_app['event'], (string) $a_app['dstart'], "");
246
247 $title = ($time != "") ? $time . " " . $shy : $shy;
248
249 $event_tpl->setCurrentBlock('event_cell_content');
250 $event_tpl->setVariable("STYLE", $style);
251 $event_tpl->setVariable('EVENT_CONTENT', $title);
252
253 if ($event_html_by_plugin = $this->getContentByPlugins($a_app['event'], $a_app['dstart'], $title, $event_tpl)) {
254 $event_html = $event_html_by_plugin;
255 } else {
256 $event_tpl->parseCurrentBlock();
257 $event_html = $event_tpl->get();
258 }
259
260 $this->tpl->setVariable('GRID_CONTENT', $event_html);
261
262 // provide table cell attributes
263 $this->tpl->parseCurrentBlock();
264
265 $this->tpl->setCurrentBlock('day_cell');
266
267 $this->tpl->setVariable('DAY_ID', 'a' . $this->num_appointments);
268 $this->tpl->setVariable('TD_ROWSPAN', $a_app['rowspan']);
269 $this->tpl->setVariable('TD_STYLE', $a_app['event']->getPresentationStyle());
270 $this->tpl->setVariable('TD_CLASS', 'calevent il_calevent');
271
272 $this->tpl->parseCurrentBlock();
273
274 $this->num_appointments++;
275 }
276
282 protected function parseHourInfo(
283 array $daily_apps,
284 ilDateTime $date,
285 int $num_day,
286 array $hours = null,
287 int $morning_aggr = 0,
288 int $evening_aggr = 0
289 ): array {
290 for ($i = $morning_aggr; $i <= $evening_aggr; $i += $this->raster) {
291 $hours[$i][$num_day]['apps_start'] = array();
292 $hours[$i][$num_day]['apps_num'] = 0;
293 switch ($this->user_settings->getTimeFormat()) {
295 if ($morning_aggr > 0 && $i == $morning_aggr) {
296 $hours[$i][$num_day]['txt'] = sprintf('%02d:00', 0) . ' - ' .
297 sprintf('%02d:00', ceil(($i + 1) / 60));
298 } else {
299 if (!isset($hours[$i][$num_day]['txt'])) {
300 $hours[$i][$num_day]['txt'] = sprintf('%02d:%02d', floor($i / 60), $i % 60);
301 } else {
302 $hours[$i][$num_day]['txt'] .= sprintf('%02d:%02d', floor($i / 60), $i % 60);
303 }
304 }
305 if ($evening_aggr < 23 * 60 && $i == $evening_aggr) {
306 if (!isset($hours[$i][$num_day]['txt'])) {
307 $hours[$i][$num_day]['txt'] = ' - ' . sprintf('%02d:00', 0);
308 } else {
309 $hours[$i][$num_day]['txt'] .= ' - ' . sprintf('%02d:00', 0);
310 }
311 }
312 break;
313
315 if ($morning_aggr > 0 && $i == $morning_aggr) {
316 $hours[$i][$num_day]['txt'] =
317 date('h a', mktime(0, 0, 0, 1, 1, 2000)) . ' - ' .
318 date('h a', mktime($this->user_settings->getDayStart(), 0, 0, 1, 1, 2000));
319 } else {
320 if (!isset($hours[$i][$num_day]['txt'])) {
321 $hours[$i][$num_day]['txt'] = date('h a', mktime((int) floor($i / 60), $i % 60, 0, 1, 1, 2000));
322 } else {
323 $hours[$i][$num_day]['txt'] .= date('h a', mktime((int) floor($i / 60), $i % 60, 0, 1, 1, 2000));
324 }
325 }
326 if ($evening_aggr < 23 * 60 && $i == $evening_aggr) {
327 $hours[$i][$num_day]['txt'] =
328 date('h a', mktime($this->user_settings->getDayEnd(), 0, 0, 1, 1, 2000)) . ' - ' .
329 date('h a', mktime(0, 0, 0, 1, 1, 2000));
330 }
331 break;
332 }
333 }
334
335 $date_info = $date->get(IL_CAL_FKT_GETDATE, '', 'UTC');
336
337 foreach ($daily_apps as $app) {
338 // fullday appointment are not relavant
339 if ($app['fullday']) {
340 continue;
341 }
342 // start hour for this day
343 #21636
344 if ($app['start_info']['mday'] != $date_info['mday']) {
345 $start = 0;
346 } else {
347 $start = $app['start_info']['hours'] * 60 + $app['start_info']['minutes'];
348 }
349 #21132 #21636
350 //$start = $app['start_info']['hours']*60+$app['start_info']['minutes'];
351
352 // end hour for this day
353 if ($app['end_info']['mday'] != $date_info['mday']) {
354 $end = 23 * 60;
355 } elseif ($app['start_info']['hours'] == $app['end_info']['hours']) {
356 $end = $start + $this->raster;
357 } else {
358 $end = $app['end_info']['hours'] * 60 + $app['end_info']['minutes'];
359 }
360 #21132 #21636
361 //$end = $app['end_info']['hours']*60+$app['end_info']['minutes'];
362
363 if ($start < $morning_aggr) {
364 $start = $morning_aggr;
365 }
366 if ($end <= $morning_aggr) {
367 $end = $morning_aggr + $this->raster;
368 }
369 if ($start > $evening_aggr) {
370 $start = $evening_aggr;
371 }
372 if ($end > $evening_aggr + $this->raster) {
373 $end = $evening_aggr + $this->raster;
374 }
375 if ($end <= $start) {
376 $end = $start + $this->raster;
377 }
378
379 // map start and end to raster
380 $start = floor($start / $this->raster) * $this->raster;
381 $end = ceil($end / $this->raster) * $this->raster;
382
383 $first = true;
384 for ($i = $start; $i < $end; $i += $this->raster) {
385 if ($first) {
386 $app['rowspan'] = ceil(($end - $start) / $this->raster);
387 $hours[$i][$num_day]['apps_start'][] = $app;
388 $first = false;
389 }
390 $hours[$i][$num_day]['apps_num']++;
391 }
392 }
393 return $hours;
394 }
395
396 protected function calculateColspans(array $hours): void
397 {
398 foreach ($hours as $hour_num => $hours_per_day) {
399 foreach ($hours_per_day as $num_day => $hour) {
400 $this->colspans[$num_day] = max($this->colspans[$num_day] ?? 0, $hour['apps_num'] ?? 0);
401 }
402 }
403 }
404
405 protected function getMorningAggr(): int
406 {
407 if ($this->user_settings->getDayStart()) {
408 // push starting point to last "slot" of hour BEFORE morning aggregation
409 $morning_aggr = ($this->user_settings->getDayStart() - 1) * 60 + (60 - $this->raster);
410 } else {
411 $morning_aggr = 0;
412 }
413
414 return $morning_aggr;
415 }
416
417 protected function addAppointmentLink(ilDateTime $date): void
418 {
419 $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
420
421 if ($this->cal_settings->getEnableGroupMilestones()) {
422 $new_ms_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'addMilestone');
423
424 $this->tpl->setCurrentBlock("new_ms");
425 $this->tpl->setVariable('DD_ID', $date->get(IL_CAL_UNIX));
426 $this->tpl->setVariable(
427 'DD_TRIGGER',
428 $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add())
429 );
430 $this->tpl->setVariable('URL_DD_NEW_APP', $new_app_url);
431 $this->tpl->setVariable('TXT_DD_NEW_APP', $this->lng->txt('cal_new_app'));
432 $this->tpl->setVariable('URL_DD_NEW_MS', $new_ms_url);
433 $this->tpl->setVariable('TXT_DD_NEW_MS', $this->lng->txt('cal_new_ms'));
434 $this->tpl->parseCurrentBlock();
435 } else {
436 $this->tpl->setCurrentBlock("new_app");
437 //$this->tpl->setVariable('NEW_APP_LINK',$new_app_url);
438 $this->tpl->setVariable('NEW_APP_GLYPH', $this->ui_renderer->render(
439 $this->ui_factory->symbol()->glyph()->add($new_app_url)
440 ));
441 // $this->tpl->setVariable('NEW_APP_ALT',$this->lng->txt('cal_new_app'));
442 $this->tpl->parseCurrentBlock();
443 }
444
445 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
446 }
447
448 protected function setUpCalendar(): void
449 {
450 $bkid = $this->initBookingUserFromQuery();
451 if ($bkid) {
452 $this->user_id = $bkid;
453 $this->disable_empty = true;
454 $this->no_add = true;
455 } elseif ($this->user->getId() == ANONYMOUS_USER_ID) {
456 $this->disable_empty = false;
457 $this->no_add = true;
458 } else {
459 $this->disable_empty = false;
460 $this->no_add = false;
461 }
462 }
463
464 protected function addHeaderDate($date, $num_apps): void
465 {
466 $date_info = $date->get(IL_CAL_FKT_GETDATE, '', 'UTC');
467 $dayname = ilCalendarUtil::_numericDayToString((int) $date->get(IL_CAL_FKT_DATE, 'w'), false);
468 $daydate = $dayname . ' ' . $date_info['mday'] . '.';
469
470 if (!$this->disable_empty || $num_apps[$date->get(IL_CAL_DATE)] > 0) {
471 $link = $this->ctrl->getLinkTargetByClass('ilcalendardaygui', '');
472 $this->ctrl->clearParametersByClass('ilcalendardaygui');
473
474 $this->tpl->setCurrentBlock("day_view_link");
475 $this->tpl->setVariable('HEADER_DATE', $daydate);
476 $this->tpl->setVariable('DAY_VIEW_LINK', $link);
477 $this->tpl->parseCurrentBlock();
478 } else {
479 $this->tpl->setCurrentBlock("day_view_no_link");
480 $this->tpl->setVariable('HEADER_DATE', $daydate);
481 $this->tpl->parseCurrentBlock();
482 }
483 }
484
485 protected function addFullDayEvents($all_fullday): void
486 {
487 $counter = 0;
488 foreach ($all_fullday as $daily_apps) {
489 foreach ($daily_apps as $event) {
490 if ($event['fullday']) {
491 $this->showFulldayAppointment($event);
492 }
493 }
494 $this->tpl->setCurrentBlock('f_day_row');
495 $this->tpl->setVariable('COLSPAN', max($this->colspans[$counter], 1));
496 $this->tpl->parseCurrentBlock();
497 $counter++;
498 }
499 $this->tpl->setCurrentBlock('fullday_apps');
500 $this->tpl->setVariable('TXT_F_DAY', $this->lng->txt("cal_all_day"));
501 $this->tpl->parseCurrentBlock();
502 }
503
504 protected function addTimedEvents(array $hours, int $morning_aggr, int $evening_aggr): void
505 {
506 $new_link_counter = 0;
507 $day_id_counter = 0;
508 foreach ($hours as $num_hour => $hours_per_day) {
509 $first = true;
510 foreach ($hours_per_day as $num_day => $hour) {
511
512 #ADD the hours in the left side of the grid.
513 if ($first) {
514 if (!($num_hour % 60) || ($num_hour == $morning_aggr && $morning_aggr) ||
515 ($num_hour == $evening_aggr && $evening_aggr)) {
516 $first = false;
517
518 // aggregation rows
519 if (($num_hour == $morning_aggr && $morning_aggr) ||
520 ($num_hour == $evening_aggr && $evening_aggr)) {
521 $this->tpl->setVariable('TIME_ROWSPAN', 1);
522 } // rastered hour
523 else {
524 $this->tpl->setVariable('TIME_ROWSPAN', 60 / $this->raster);
525 }
526
527 $this->tpl->setCurrentBlock('time_txt');
528
529 $this->tpl->setVariable('TIME', $hour['txt']);
530 $this->tpl->parseCurrentBlock();
531 }
532 }
533
534 foreach ($hour['apps_start'] as $app) {
535 $this->showAppointment($app);
536 }
537 $num_apps = $hour['apps_num'];
538 $colspan = max($this->colspans[$num_day], 1);
539
540 // Show new apointment link
541 if (!$hour['apps_num'] && !$this->no_add) {
542 $this->tpl->setCurrentBlock('new_app_link');
543
544 $this->ctrl->clearParameterByClass('ilcalendarappointmentgui', 'app_id');
545
546 $this->ctrl->setParameterByClass(
547 'ilcalendarappointmentgui',
548 'idate',
549 $this->weekdays[$num_day]->get(IL_CAL_DATE)
550 );
551 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $this->seed->get(IL_CAL_DATE));
552 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'hour', floor($num_hour / 60));
553
554 //todo:it could be nice use also ranges of 15 min to create events.
555 $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
556 $this->tpl->setVariable(
557 "DAY_NEW_APP_LINK",
558 $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add($new_app_url))
559 );
560 $this->tpl->setVariable('DAY_NEW_ID', ++$new_link_counter);
561 $this->tpl->parseCurrentBlock();
562 }
563
564 for ($i = $colspan; $i > $hour['apps_num']; $i--) {
565 $this->tpl->setCurrentBlock('day_cell');
566
567 // last "slot" of hour needs border
568 $empty_border = '';
569 if ($num_hour % 60 == 60 - $this->raster ||
570 ($num_hour == $morning_aggr && $morning_aggr) ||
571 ($num_hour == $evening_aggr && $evening_aggr)) {
572 $empty_border = ' calempty_border';
573 }
574
575 $this->tpl->setVariable('TD_CLASS', 'calempty createhover' . $empty_border);
576
577 $this->tpl->setVariable('DAY_ID', ++$day_id_counter);
578 $this->tpl->setVariable('TD_ROWSPAN', 1);
579 $this->tpl->parseCurrentBlock();
580 }
581 }
582 $this->tpl->touchBlock('time_row');
583 }
584 }
585
590 protected function getAppointmentTimeString(ilCalendarEntry $a_event): string
591 {
592 $time = "";
593 switch ($this->user_settings->getTimeFormat()) {
595 $time = $a_event->getStart()->get(IL_CAL_FKT_DATE, 'H:i', $this->timezone);
596 break;
597
599 $time = $a_event->getStart()->get(IL_CAL_FKT_DATE, 'h:ia', $this->timezone);
600 break;
601 }
602
603 return $time;
604 }
605}
const IL_CAL_FKT_GETDATE
const IL_CAL_DATE
const IL_CAL_UNIX
const IL_CAL_FKT_DATE
Administrate calendar appointments.
static _getInstance(ilDate $seed, array $a_app)
get singleton instance
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getStart()
Get start of date period.
Represents a list of calendar appointments (including recurring events) for a specific user in a give...
Stores all calendar relevant settings.
static _getInstanceByUserId(int $a_user_id)
static calculateFontColor(string $a_html_color_code)
Calculate best font color from html hex color code.
static _buildWeekDayList(ilDate $a_day, int $a_weekstart)
build week day list @access public
static _numericDayToString(int $a_day, bool $a_long=true)
getAppointmentShyButton(ilCalendarEntry $a_calendar_entry, string $a_dstart, string $a_title_forced="")
getContentByPlugins(ilCalendarEntry $a_cal_entry, int $a_start_date, string $a_content, ilTemplate $a_tpl)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addAppointmentLink(ilDateTime $date)
ilCalendarAppointmentColors $app_colors
getAppointmentTimeString(ilCalendarEntry $a_event)
addTimedEvents(array $hours, int $morning_aggr, int $evening_aggr)
ilCalendarSettings $cal_settings
initialize(int $a_calendar_presentation_type)
parseHourInfo(array $daily_apps, ilDateTime $date, int $num_day, array $hours=null, int $morning_aggr=0, int $evening_aggr=0)
calculate overlapping hours @access protected
__construct(ilDate $seed_date)
addHeaderDate($date, $num_apps)
showFulldayAppointment(array $a_app)
ilCalendarUserSettings $user_settings
@classDescription Date and time handling
get(int $a_format, string $a_format_str='', string $a_tz='')
get formatted date
Class for single dates.
static get(string $a_var)
special template class to simplify handling of ITX/PEAR
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static initDragDrop(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Drag and Drop used in Modules/Survey, Services/Calendar, Services/COPage,...
$app
Definition: cli.php:39
const ANONYMOUS_USER_ID
Definition: constants.php:27
$ilUser
Definition: imgupload.php:34
$i
Definition: metadata.php:41
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc