ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCalendarViewGUI Class Reference
+ Inheritance diagram for ilCalendarViewGUI:
+ Collaboration diagram for ilCalendarViewGUI:

Public Member Functions

 __construct (ilDate $seed, int $presentation_type)
 
 setConsulationHoursUserId (int $a_user_id)
 
 getConsultationHoursUserId ()
 
 initialize (int $a_calendar_presentation_type)
 
 getCurrentApp ()
 
 getEvents ()
 
 getDatesForItem ($item)
 
 getModalForApp ()
 Get modal for appointment (see similar code in ilCalendarBlockGUI) More...
 
 getAppointmentShyButton (ilCalendarEntry $a_calendar_entry, string $a_dstart, string $a_title_forced="")
 
 getActivePlugins (string $a_slot_id)
 
 getModalTitleByPlugins (string $a_current_title)
 
 getContentByPlugins (ilCalendarEntry $a_cal_entry, int $a_start_date, string $a_content, ilTemplate $a_tpl)
 
 addToolbarFileDownload ()
 Add download link to toolbar. More...
 
 downloadFiles ()
 Download files related to the appointments showed in the current calendar view (day,week,month,list). More...
 
 getBucketTitle ()
 get proper label to add in the background task popover More...
 
 countEventsInView ()
 get the events starting between 2 dates based in seed + view options. More...
 

Data Fields

const CAL_PRESENTATION_UNDEFINED = 0
 
const CAL_PRESENTATION_DAY = 1
 
const CAL_PRESENTATION_WEEK = 2
 
const CAL_PRESENTATION_MONTH = 3
 
const CAL_PRESENTATION_AGENDA_LIST = 9
 

Protected Member Functions

 initAppointmentIdFromQuery ()
 
 initInitialDateFromQuery ()
 
 initInitialDateTimeFromQuery ()
 
 initBookingUserFromQuery ()
 

Protected Attributes

int $presentation_type = self::CAL_PRESENTATION_UNDEFINED
 
bool $view_with_appointments = false
 
ilDate $seed
 
int $ch_user_id = 0
 
string $period_end_day = null
 
Factory $ui_factory
 
Renderer $ui_renderer
 
ilCtrlInterface $ctrl
 
ilToolbarGUI $toolbar
 
ilLogger $logger
 
ILIAS DI UIServices $ui
 
ilLanguage $lng
 
ilObjUser $user
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilComponentFactory $component_factory
 
ilTabsGUI $tabs_gui
 
RefineryFactory $refinery
 
HttpServices $http
 

Detailed Description

Author
Jesús López Reyes lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 32 of file class.ilCalendarViewGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarViewGUI::__construct ( ilDate  $seed,
int  $presentation_type 
)

Definition at line 61 of file class.ilCalendarViewGUI.php.

62 {
63 $this->seed = $seed;
65 }
initialize(int $a_calendar_presentation_type)

References $seed, and initialize().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToolbarFileDownload()

ilCalendarViewGUI::addToolbarFileDownload ( )

Add download link to toolbar.

Definition at line 396 of file class.ilCalendarViewGUI.php.

396 : void
397 {
399
400 if ($settings->isBatchFileDownloadsEnabled()) {
401 $num_events = 0;
402 if ($this->presentation_type == self::CAL_PRESENTATION_AGENDA_LIST) {
403 $num_events = $this->countEventsInView();
404 }
405 if ($this->view_with_appointments || $num_events) {
410
411 // file download
412 $add_button = $f->button()->standard(
413 $this->lng->txt("cal_download_files"),
414 $ctrl->getLinkTarget($this, "downloadFiles")
415 );
417 $toolbar->addComponent($add_button);
418 }
419 }
420 }
countEventsInView()
get the events starting between 2 dates based in seed + view options.
addComponent(\ILIAS\UI\Component\Component $a_comp)
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
Returns a link target for the given information.

References Vendor\Package\$f, $lng, ilCalendarSettings\_getInstance(), ilToolbarGUI\addComponent(), ilToolbarGUI\addSeparator(), ilCtrlInterface\getLinkTarget(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ countEventsInView()

ilCalendarViewGUI::countEventsInView ( )

get the events starting between 2 dates based in seed + view options.

Returns
int number of events in the calendar list view.

Definition at line 488 of file class.ilCalendarViewGUI.php.

488 : int
489 {
490 $start = $this->seed;
491 $end = clone $start;
492 $get_list_option = ilCalendarAgendaListGUI::getPeriod();
493 switch ($get_list_option) {
495 break;
497 $end->increment(IL_CAL_MONTH, 1);
498 break;
500 $end->increment(IL_CAL_MONTH, 6);
501 break;
503 default:
504 $end->increment(IL_CAL_DAY, 7);
505 break;
506 }
507 $events = $this->getEvents();
508 $num_events = 0;
509 foreach ($events as $event) {
510 $event_start = $event['event']->getStart()->get(IL_CAL_DATE);
511
512 if ($event_start >= $start->get(IL_CAL_DATE) && $event_start <= $end->get(IL_CAL_DATE)) {
513 $num_events++;
514 }
515 }
516 return $num_events;
517 }
const IL_CAL_DATE
const IL_CAL_MONTH
const IL_CAL_DAY
static getPeriod()
needed in CalendarInboxGUI to get events using a proper period.

References ilCalendarAgendaListGUI\getPeriod(), IL_CAL_DATE, IL_CAL_DAY, IL_CAL_MONTH, ilCalendarAgendaListGUI\PERIOD_DAY, ilCalendarAgendaListGUI\PERIOD_HALF_YEAR, ilCalendarAgendaListGUI\PERIOD_MONTH, and ilCalendarAgendaListGUI\PERIOD_WEEK.

+ Here is the call graph for this function:

◆ downloadFiles()

ilCalendarViewGUI::downloadFiles ( )

Download files related to the appointments showed in the current calendar view (day,week,month,list).

Not modals

Definition at line 425 of file class.ilCalendarViewGUI.php.

425 : void
426 {
427 $download_job = new ilDownloadFilesBackgroundTask($this->user->getId());
428 $download_job->setBucketTitle($this->getBucketTitle());
429 $download_job->setEvents($this->getEvents());
430 if ($download_job->run()) {
431 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('cal_download_files_started'), true);
432 }
433 $this->ctrl->redirect($this);
434 }
getBucketTitle()
get proper label to add in the background task popover

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getActivePlugins()

ilCalendarViewGUI::getActivePlugins ( string  $a_slot_id)
Parameters
string$a_slot_id
Returns
Iterator <ilPlugin>

Definition at line 330 of file class.ilCalendarViewGUI.php.

330 : Iterator
331 {
332 return $this->component_factory->getActivePluginsInSlot($a_slot_id);
333 }

Referenced by ilCalendarAgendaListGUI\getPluginAgendaItem().

+ Here is the caller graph for this function:

◆ getAppointmentShyButton()

ilCalendarViewGUI::getAppointmentShyButton ( ilCalendarEntry  $a_calendar_entry,
string  $a_dstart,
string  $a_title_forced = "" 
)
Parameters
ilCalendarEntry$a_calendar_entry
string$a_dstart
string$a_title_forced//used in plugins to rename the shy button title.
Returns
string shy button html

Definition at line 283 of file class.ilCalendarViewGUI.php.

287 : string {
288 $this->ctrl->setParameter($this, "app_id", $a_calendar_entry->getEntryId());
289
290 if ($this->getConsultationHoursUserId()) {
291 $this->ctrl->setParameter($this, 'chuid', $this->getConsultationHoursUserId());
292 }
293 $this->ctrl->setParameter($this, 'dt', $a_dstart);
294 $this->ctrl->setParameter($this, 'seed', $this->seed->get(IL_CAL_DATE));
295 $url = $this->ctrl->getLinkTarget($this, "getModalForApp", "", true, false);
296 $this->ctrl->setParameter($this, "app_id", $this->initAppointmentIdFromQuery());
297 $this->ctrl->setParameter($this, "dt", $this->initInitialDateTimeFromQuery());
298 $this->ctrl->setParameter($this, 'seed', $this->seed->get(IL_CAL_DATE));
299
300 $modal = $this->ui_factory->modal()->roundtrip('', [])->withAsyncRenderUrl($url);
301
302 //Day view presents the titles with the full length.(agenda:class.ilCalendarAgendaListGUI.php)
303 if ($this->presentation_type == self::CAL_PRESENTATION_DAY) {
304 $title = ($a_title_forced == "") ? $a_calendar_entry->getPresentationTitle(false) : $a_title_forced;
305 } else {
306 $title = ($a_title_forced == "") ? $a_calendar_entry->getPresentationTitle() : $a_title_forced;
307 }
308
309 // aria label including start time
310 $start_time = '';
311 switch ($this->user_settings->getTimeFormat()) {
313 $start_time = $a_calendar_entry->getStart()->get(IL_CAL_FKT_DATE, 'H:i', $this->timezone);
314 break;
315
317 $start_time = $a_calendar_entry->getStart()->get(IL_CAL_FKT_DATE, 'h:ia', $this->timezone);
318 break;
319 }
320 $aria_label = $start_time . ' - ' . $title;
321
322 $comps = [$this->ui_factory->button()->shy($title, "#")->withAriaLabel($aria_label)->withOnClick($modal->getShowSignal()), $modal];
323 return $this->ui_renderer->render($comps);
324 }
const IL_CAL_FKT_DATE
getStart()
Get start of date period.
getPresentationTitle(bool $a_shorten=true)
$url
Definition: shib_logout.php:68

References ILIAS\Repository\ctrl(), and getConsultationHoursUserId().

Referenced by ilCalendarDayGUI\showAppointment(), ilCalendarWeekGUI\showAppointment(), ilCalendarMonthGUI\showEvents(), ilCalendarDayGUI\showFulldayAppointment(), and ilCalendarWeekGUI\showFulldayAppointment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBucketTitle()

ilCalendarViewGUI::getBucketTitle ( )

get proper label to add in the background task popover

Definition at line 439 of file class.ilCalendarViewGUI.php.

439 : string
440 {
441 //definition of bucket titles here: 21365
442 $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
443 $bucket_title = $this->lng->txt("cal_calendar_download");
444
445 switch ($this->presentation_type) {
447 $bucket_title .= " " . $this->seed->get(IL_CAL_DATE);
448 break;
450 $weekday_list = ilCalendarUtil::_buildWeekDayList($this->seed, $user_settings->getWeekStart())->get();
451 $start = current($weekday_list);
452 $char = strtolower(mb_substr($this->lng->txt("week"), 0, 1));
453 $bucket_title .= " " . $start->get(IL_CAL_DATE) . " 1$char";
454 break;
456 $year_month = $this->seed->get(IL_CAL_FKT_DATE, 'Y-m', 'UTC');
457 $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
458 $bucket_title .= " " . $year_month . " 1" . $char;
459 break;
461 $bucket_title .= " " . $this->seed->get(IL_CAL_DATE);
462 $get_list_option = intval($this->user->getPref('cal_list_view'));
463 switch ($get_list_option) {
465 break;
467 $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
468 $bucket_title .= " 1$char";
469 break;
471 $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
472 $bucket_title .= " 6$char";
473 break;
475 default:
476 $char = strtolower(mb_substr($this->lng->txt("week"), 0, 1));
477 $bucket_title .= " 1$char";
478 break;
479 }
480 }
481 return $bucket_title;
482 }
static _getInstanceByUserId(int $a_user_id)
static _buildWeekDayList(ilDate $a_day, int $a_weekstart)
build week day list @access public

References ilCalendarUtil\_buildWeekDayList(), ilCalendarUserSettings\_getInstanceByUserId(), IL_CAL_DATE, IL_CAL_FKT_DATE, ILIAS\Repository\lng(), ilCalendarAgendaListGUI\PERIOD_DAY, ilCalendarAgendaListGUI\PERIOD_HALF_YEAR, ilCalendarAgendaListGUI\PERIOD_MONTH, ilCalendarAgendaListGUI\PERIOD_WEEK, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getConsultationHoursUserId()

ilCalendarViewGUI::getConsultationHoursUserId ( )

Definition at line 72 of file class.ilCalendarViewGUI.php.

72 : int
73 {
74 return $this->ch_user_id;
75 }

References $ch_user_id.

Referenced by getAppointmentShyButton().

+ Here is the caller graph for this function:

◆ getContentByPlugins()

ilCalendarViewGUI::getContentByPlugins ( ilCalendarEntry  $a_cal_entry,
int  $a_start_date,
string  $a_content,
ilTemplate  $a_tpl 
)
Parameters
ilCalendarEntry$a_cal_entry
int$a_start_date
string$a_content
ilTemplate$a_tplneeded to adding elements in the template like extra content inside the event container
Returns
string

Definition at line 353 of file class.ilCalendarViewGUI.php.

358 : string {
359 $content = $a_content;
360
361 //"capg" is the plugin slot id for AppointmentCustomGrid
362 foreach ($this->getActivePlugins("capg") as $plugin) {
363 $plugin->setAppointment($a_cal_entry, new ilDateTime($a_start_date, IL_CAL_UNIX));
364
365 if ($new_title = $plugin->editShyButtonTitle()) {
366 $a_tpl->setVariable(
367 'EVENT_CONTENT',
368 $this->getAppointmentShyButton($a_cal_entry, (string) $a_start_date, $new_title)
369 );
370 }
371
372 if ($glyph = $plugin->addGlyph()) {
373 $a_tpl->setVariable('EXTRA_GLYPH_BY_PLUGIN', $glyph);
374 }
375
376 if ($more_content = $plugin->addExtraContent()) {
377 $a_tpl->setVariable('EXTRA_CONTENT_BY_PLUGIN', $more_content);
378 }
379
380 $a_tpl->parseCurrentBlock();
381 $html_content = $a_tpl->get();
382
383 if ($new_content = $plugin->replaceContent($html_content)) {
384 $content = $new_content;
385 }
386 }
387 if ($content == $a_content) {
388 return '';
389 }
390 return $content;
391 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
const IL_CAL_UNIX
getAppointmentShyButton(ilCalendarEntry $a_calendar_entry, string $a_dstart, string $a_title_forced="")
getActivePlugins(string $a_slot_id)
@classDescription Date and time handling
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
Returns a block with all replacements done.
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)

References XapiProxy\$plugin, ilTemplate\get(), IL_CAL_UNIX, ilTemplate\parseCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by ilCalendarDayGUI\showAppointment(), ilCalendarWeekGUI\showAppointment(), ilCalendarMonthGUI\showEvents(), ilCalendarDayGUI\showFulldayAppointment(), and ilCalendarWeekGUI\showFulldayAppointment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentApp()

ilCalendarViewGUI::getCurrentApp ( )

Definition at line 147 of file class.ilCalendarViewGUI.php.

147 : ?array
148 {
149 // @todo: this needs optimization
150 $events = $this->getEvents();
151 foreach ($events as $item) {
152 if ($item["event"]->getEntryId() == $this->initAppointmentIdFromQuery()) {
153 return $item;
154 }
155 }
156 return null;
157 }

References getEvents(), and initAppointmentIdFromQuery().

Referenced by ilCalendarDayGUI\executeCommand(), ilCalendarMonthGUI\executeCommand(), and ilCalendarWeekGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDatesForItem()

ilCalendarViewGUI::getDatesForItem (   $item)
Parameters
$item
Returns
array<{start: ilDate|ilDateTime, end: ilDate|ilDateTime}>
Exceptions
ilDateTimeException

Definition at line 230 of file class.ilCalendarViewGUI.php.

230 : array
231 {
232 $start = $item["dstart"];
233 $end = $item["dend"];
234 if ($item["fullday"]) {
235 $start = new ilDate($start, IL_CAL_UNIX);
236 $end = new ilDate($end, IL_CAL_UNIX);
237 } else {
238 $start = new ilDateTime($start, IL_CAL_UNIX);
239 $end = new ilDateTime($end, IL_CAL_UNIX);
240 }
241 return array("start" => $start, "end" => $end);
242 }
Class for single dates.

References IL_CAL_UNIX.

Referenced by getModalForApp().

+ Here is the caller graph for this function:

◆ getEvents()

ilCalendarViewGUI::getEvents ( )

Definition at line 159 of file class.ilCalendarViewGUI.php.

159 : array
160 {
161 $user = $this->user->getId();
162 $schedule = null;
163 switch ($this->presentation_type) {
165 $end_date = clone $this->seed;
168 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user, true);
169 $end_date->increment(IL_CAL_DAY, 1);
170 break;
171
173 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
174 $end_date->increment(IL_CAL_WEEK, 1);
175 break;
176
178 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_MONTH, $user, true);
179 $end_date->increment(IL_CAL_MONTH, 1);
180 break;
181
183 $schedule = new ilCalendarSchedule(
184 $this->seed,
186 $user,
187 true
188 );
189 $end_date->increment(IL_CAL_MONTH, 6);
190 break;
191 default:
192 // default is week ?!
193 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
194 $end_date->increment(IL_CAL_WEEK, 1);
195 break;
196 }
197 $this->period_end_day = $end_date->get(IL_CAL_DATE);
198 $schedule->setPeriod($this->seed, $end_date);
199
200 //}
201 /*else
202 {
203 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_PD_UPCOMING);
204 }*/
205
206 break;
208 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user, true);
209 break;
211 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
212 break;
214 // if we put the user and true in the call method we will get only events and
215 // files from the current month. Not from 6 days before and after.
216 $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_MONTH);
217 break;
218 }
219
220 $schedule->addSubitemCalendars(true);
221 $schedule->calculate();
222 return $schedule->getScheduledEvents();
223 }
const IL_CAL_WEEK
Represents a list of calendar appointments (including recurring events) for a specific user in a give...

References $seed, $user, CAL_PRESENTATION_AGENDA_LIST, CAL_PRESENTATION_DAY, CAL_PRESENTATION_MONTH, CAL_PRESENTATION_WEEK, ilCalendarAgendaListGUI\getPeriod(), IL_CAL_DATE, IL_CAL_DAY, IL_CAL_MONTH, IL_CAL_WEEK, ilCalendarAgendaListGUI\PERIOD_DAY, ilCalendarAgendaListGUI\PERIOD_HALF_YEAR, ilCalendarAgendaListGUI\PERIOD_MONTH, ilCalendarAgendaListGUI\PERIOD_WEEK, ilCalendarSchedule\TYPE_DAY, ilCalendarSchedule\TYPE_HALF_YEAR, ilCalendarSchedule\TYPE_MONTH, ilCalendarSchedule\TYPE_WEEK, and ILIAS\Repository\user().

Referenced by getCurrentApp(), ilCalendarAgendaListGUI\getHTML(), and getModalForApp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getModalForApp()

ilCalendarViewGUI::getModalForApp ( )

Get modal for appointment (see similar code in ilCalendarBlockGUI)

Todo:
fix envent initialisation

Definition at line 248 of file class.ilCalendarViewGUI.php.

248 : void
249 {
250 // set return class
251 $this->ctrl->setReturn($this, '');
252
253 // @todo: this needs optimization
254 $events = $this->getEvents();
255
256 //item => array containing ilcalendary object, dstart of the event , dend etc.
257 foreach ($events as $item) {
258 if ($item["event"]->getEntryId() == $this->initAppointmentIdFromQuery() && $item['dstart'] == $this->initInitialDateTimeFromQuery()) {
259 $dates = $this->getDatesForItem($item);
260 // content of modal
261 $next_gui = ilCalendarAppointmentPresentationGUI::_getInstance($this->seed, $item);
262 $content = $this->ctrl->getHTML($next_gui);
263
264 //plugins can change the modal title.
265 $modal_title = ilDatePresentation::formatPeriod($dates["start"], $dates["end"]);
266 $modal_title = $this->getModalTitleByPlugins($modal_title);
267 $modal = $this->ui_factory->modal()->roundtrip(
268 $modal_title,
269 $this->ui_factory->legacy()->content($content)
270 )->withCancelButtonLabel($this->lng->txt("close"));
271 echo $this->ui_renderer->renderAsync($modal);
272 }
273 }
274 exit();
275 }
static _getInstance(ilDate $seed, array $a_app)
get singleton instance
getModalTitleByPlugins(string $a_current_title)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
exit

References ilCalendarAppointmentPresentationGUI\_getInstance(), ILIAS\Repository\ctrl(), exit, ilDatePresentation\formatPeriod(), getDatesForItem(), getEvents(), getModalTitleByPlugins(), initAppointmentIdFromQuery(), initInitialDateTimeFromQuery(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getModalTitleByPlugins()

ilCalendarViewGUI::getModalTitleByPlugins ( string  $a_current_title)

Definition at line 335 of file class.ilCalendarViewGUI.php.

335 : string
336 {
337 $modal_title = $a_current_title;
338 //demo of plugin execution.
339 //"capm" is the plugin slot id for Appointment presentations (modals)
340 foreach ($this->getActivePlugins("capm") as $plugin) {
341 $modal_title = ($new_title = $plugin->editModalTitle($a_current_title)) ? $new_title : $a_current_title;
342 }
343 return $modal_title;
344 }

References XapiProxy\$plugin.

Referenced by getModalForApp().

+ Here is the caller graph for this function:

◆ initAppointmentIdFromQuery()

ilCalendarViewGUI::initAppointmentIdFromQuery ( )
protected

Definition at line 103 of file class.ilCalendarViewGUI.php.

103 : int
104 {
105 if ($this->http->wrapper()->query()->has('app_id')) {
106 return $this->http->wrapper()->query()->retrieve(
107 'app_id',
108 $this->refinery->kindlyTo()->int()
109 );
110 }
111 return 0;
112 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by ilCalendarDayGUI\executeCommand(), ilCalendarInboxGUI\executeCommand(), ilCalendarMonthGUI\executeCommand(), ilCalendarWeekGUI\executeCommand(), getCurrentApp(), ilCalendarAgendaListGUI\getHTML(), and getModalForApp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initBookingUserFromQuery()

ilCalendarViewGUI::initBookingUserFromQuery ( )
protected

Definition at line 136 of file class.ilCalendarViewGUI.php.

136 : int
137 {
138 if ($this->http->wrapper()->query()->has('bkid')) {
139 return $this->http->wrapper()->query()->retrieve(
140 'bkid',
141 $this->refinery->kindlyTo()->int()
142 );
143 }
144 return 0;
145 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by ilCalendarMonthGUI\__construct(), and ilCalendarDayGUI\show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize()

ilCalendarViewGUI::initialize ( int  $a_calendar_presentation_type)

Reimplemented in ilCalendarDayGUI, ilCalendarInboxGUI, ilCalendarMonthGUI, and ilCalendarWeekGUI.

Definition at line 77 of file class.ilCalendarViewGUI.php.

77 : void
78 {
79 global $DIC;
80
81 $this->component_factory = $DIC['component.factory'];
82 $this->ui_factory = $DIC->ui()->factory();
83 $this->ui_renderer = $DIC->ui()->renderer();
84 $this->ui = $DIC->ui();
85 $this->ctrl = $DIC->ctrl();
86 $this->lng = $DIC->language();
87 $this->user = $DIC->user();
88 $this->tabs_gui = $DIC->tabs();
89 $this->toolbar = $DIC->toolbar();
90 $this->presentation_type = $a_calendar_presentation_type;
91 $this->logger = $DIC->logger()->cal();
92 $this->view_with_appointments = false;
93 $this->main_tpl = $DIC->ui()->mainTemplate();
94 if ($this->presentation_type == self::CAL_PRESENTATION_DAY ||
95 $this->presentation_type == self::CAL_PRESENTATION_WEEK) {
96 iljQueryUtil::initjQuery($this->main_tpl);
97 $this->main_tpl->addJavaScript('assets/js/calendar_appointment.js');
98 }
99 $this->http = $DIC->http();
100 $this->refinery = $DIC->refinery();
101 }
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), iljQueryUtil\initjQuery(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\refinery(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initInitialDateFromQuery()

ilCalendarViewGUI::initInitialDateFromQuery ( )
protected

Definition at line 114 of file class.ilCalendarViewGUI.php.

114 : string
115 {
116 if ($this->http->wrapper()->query()->has('idate')) {
117 return $this->http->wrapper()->query()->retrieve(
118 'idate',
119 $this->refinery->kindlyTo()->string()
120 );
121 }
122 return '';
123 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by ilCalendarDayGUI\executeCommand(), ilCalendarMonthGUI\executeCommand(), and ilCalendarWeekGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initInitialDateTimeFromQuery()

ilCalendarViewGUI::initInitialDateTimeFromQuery ( )
protected

Definition at line 125 of file class.ilCalendarViewGUI.php.

125 : int
126 {
127 if ($this->http->wrapper()->query()->has('dt')) {
128 return $this->http->wrapper()->query()->retrieve(
129 'dt',
130 $this->refinery->kindlyTo()->int()
131 );
132 }
133 return 0;
134 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by ilCalendarAgendaListGUI\getHTML(), and getModalForApp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setConsulationHoursUserId()

ilCalendarViewGUI::setConsulationHoursUserId ( int  $a_user_id)

Definition at line 67 of file class.ilCalendarViewGUI.php.

67 : void
68 {
69 $this->ch_user_id = $a_user_id;
70 }

Field Documentation

◆ $ch_user_id

int ilCalendarViewGUI::$ch_user_id = 0
protected

Definition at line 43 of file class.ilCalendarViewGUI.php.

Referenced by getConsultationHoursUserId().

◆ $component_factory

ilComponentFactory ilCalendarViewGUI::$component_factory
protected

Definition at line 56 of file class.ilCalendarViewGUI.php.

◆ $ctrl

ilCtrlInterface ilCalendarViewGUI::$ctrl
protected

Definition at line 48 of file class.ilCalendarViewGUI.php.

◆ $http

HttpServices ilCalendarViewGUI::$http
protected

Definition at line 59 of file class.ilCalendarViewGUI.php.

◆ $lng

ilLanguage ilCalendarViewGUI::$lng
protected

Definition at line 52 of file class.ilCalendarViewGUI.php.

◆ $logger

ilLogger ilCalendarViewGUI::$logger
protected

Definition at line 50 of file class.ilCalendarViewGUI.php.

◆ $main_tpl

ilGlobalTemplateInterface ilCalendarViewGUI::$main_tpl
protected

Definition at line 55 of file class.ilCalendarViewGUI.php.

◆ $period_end_day

string ilCalendarViewGUI::$period_end_day = null
protected

Definition at line 44 of file class.ilCalendarViewGUI.php.

◆ $presentation_type

int ilCalendarViewGUI::$presentation_type = self::CAL_PRESENTATION_UNDEFINED
protected

Definition at line 40 of file class.ilCalendarViewGUI.php.

◆ $refinery

RefineryFactory ilCalendarViewGUI::$refinery
protected

Definition at line 58 of file class.ilCalendarViewGUI.php.

◆ $seed

ilDate ilCalendarViewGUI::$seed
protected

◆ $tabs_gui

ilTabsGUI ilCalendarViewGUI::$tabs_gui
protected

Definition at line 57 of file class.ilCalendarViewGUI.php.

◆ $toolbar

ilToolbarGUI ilCalendarViewGUI::$toolbar
protected

Definition at line 49 of file class.ilCalendarViewGUI.php.

◆ $tpl

ilTemplate ilCalendarViewGUI::$tpl
protected

Definition at line 54 of file class.ilCalendarViewGUI.php.

◆ $ui

ILIAS DI UIServices ilCalendarViewGUI::$ui
protected

Definition at line 51 of file class.ilCalendarViewGUI.php.

◆ $ui_factory

Factory ilCalendarViewGUI::$ui_factory
protected

Definition at line 46 of file class.ilCalendarViewGUI.php.

◆ $ui_renderer

Renderer ilCalendarViewGUI::$ui_renderer
protected

Definition at line 47 of file class.ilCalendarViewGUI.php.

◆ $user

ilObjUser ilCalendarViewGUI::$user
protected

◆ $view_with_appointments

bool ilCalendarViewGUI::$view_with_appointments = false
protected

Definition at line 41 of file class.ilCalendarViewGUI.php.

◆ CAL_PRESENTATION_AGENDA_LIST

const ilCalendarViewGUI::CAL_PRESENTATION_AGENDA_LIST = 9

◆ CAL_PRESENTATION_DAY

const ilCalendarViewGUI::CAL_PRESENTATION_DAY = 1

Definition at line 35 of file class.ilCalendarViewGUI.php.

Referenced by ilCalendarDayGUI\__construct(), and getEvents().

◆ CAL_PRESENTATION_MONTH

const ilCalendarViewGUI::CAL_PRESENTATION_MONTH = 3

Definition at line 37 of file class.ilCalendarViewGUI.php.

Referenced by ilCalendarMonthGUI\__construct(), and getEvents().

◆ CAL_PRESENTATION_UNDEFINED

const ilCalendarViewGUI::CAL_PRESENTATION_UNDEFINED = 0

Definition at line 34 of file class.ilCalendarViewGUI.php.

◆ CAL_PRESENTATION_WEEK

const ilCalendarViewGUI::CAL_PRESENTATION_WEEK = 2

Definition at line 36 of file class.ilCalendarViewGUI.php.

Referenced by ilCalendarWeekGUI\__construct(), and getEvents().


The documentation for this class was generated from the following file: