ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 33 of file class.ilCalendarViewGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

References $seed, and initialize().

63  {
64  $this->seed = $seed;
66  }
initialize(int $a_calendar_presentation_type)
+ Here is the call graph for this function:

Member Function Documentation

◆ addToolbarFileDownload()

ilCalendarViewGUI::addToolbarFileDownload ( )

Add download link to toolbar.

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

References $ctrl, Vendor\Package\$f, $lng, ILIAS\LTI\ToolProvider\$settings, $toolbar, $ui_factory, ilCalendarSettings\_getInstance(), ilToolbarGUI\addComponent(), ilToolbarGUI\addSeparator(), countEventsInView(), ilCtrlInterface\getLinkTarget(), and ILIAS\Repository\lng().

397  : void
398  {
400 
401  if ($settings->isBatchFileDownloadsEnabled()) {
402  $num_events = 0;
403  if ($this->presentation_type == self::CAL_PRESENTATION_AGENDA_LIST) {
404  $num_events = $this->countEventsInView();
405  }
406  if ($this->view_with_appointments || $num_events) {
409  $lng = $this->lng;
410  $ctrl = $this->ctrl;
411 
412  // file download
413  $add_button = $f->button()->standard(
414  $this->lng->txt("cal_download_files"),
415  $ctrl->getLinkTarget($this, "downloadFiles")
416  );
418  $toolbar->addComponent($add_button);
419  }
420  }
421  }
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.
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
addComponent(\ILIAS\UI\Component\Component $a_comp)
countEventsInView()
get the events starting between 2 dates based in seed + view options.
+ 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 489 of file class.ilCalendarViewGUI.php.

References $seed, getEvents(), 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.

Referenced by addToolbarFileDownload().

489  : int
490  {
491  $start = $this->seed;
492  $end = clone $start;
493  $get_list_option = ilCalendarAgendaListGUI::getPeriod();
494  switch ($get_list_option) {
496  break;
498  $end->increment(IL_CAL_MONTH, 1);
499  break;
501  $end->increment(IL_CAL_MONTH, 6);
502  break;
504  default:
505  $end->increment(IL_CAL_DAY, 7);
506  break;
507  }
508  $events = $this->getEvents();
509  $num_events = 0;
510  foreach ($events as $event) {
511  $event_start = $event['event']->getStart()->get(IL_CAL_DATE);
512 
513  if ($event_start >= $start->get(IL_CAL_DATE) && $event_start <= $end->get(IL_CAL_DATE)) {
514  $num_events++;
515  }
516  }
517  return $num_events;
518  }
const IL_CAL_MONTH
const IL_CAL_DAY
static getPeriod()
needed in CalendarInboxGUI to get events using a proper period.
const IL_CAL_DATE
+ Here is the call graph for this function:
+ Here is the caller 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 426 of file class.ilCalendarViewGUI.php.

References ILIAS\Repository\ctrl(), getBucketTitle(), getEvents(), ILIAS\Repository\lng(), ilDownloadFilesBackgroundTask\setBucketTitle(), and ILIAS\Repository\user().

426  : void
427  {
428  $download_job = new ilDownloadFilesBackgroundTask($this->user->getId());
429  $download_job->setBucketTitle($this->getBucketTitle());
430  $download_job->setEvents($this->getEvents());
431  if ($download_job->run()) {
432  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('cal_download_files_started'), true);
433  }
434  $this->ctrl->redirect($this);
435  }
getBucketTitle()
get proper label to add in the background task popover
+ 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 331 of file class.ilCalendarViewGUI.php.

Referenced by getContentByPlugins(), getModalTitleByPlugins(), and ilCalendarAgendaListGUI\getPluginAgendaItem().

331  : Iterator
332  {
333  return $this->component_factory->getActivePluginsInSlot($a_slot_id);
334  }
+ 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 284 of file class.ilCalendarViewGUI.php.

References $url, ILIAS\Repository\ctrl(), getConsultationHoursUserId(), ilCalendarEntry\getEntryId(), ilCalendarEntry\getPresentationTitle(), ilCalendarEntry\getStart(), IL_CAL_DATE, IL_CAL_FKT_DATE, initAppointmentIdFromQuery(), initInitialDateTimeFromQuery(), ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.

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

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

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().

Referenced by downloadFiles().

440  : string
441  {
442  //definition of bucket titles here: 21365
443  $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
444  $bucket_title = $this->lng->txt("cal_calendar_download");
445 
446  switch ($this->presentation_type) {
447  case self::CAL_PRESENTATION_DAY:
448  $bucket_title .= " " . $this->seed->get(IL_CAL_DATE);
449  break;
450  case self::CAL_PRESENTATION_WEEK:
451  $weekday_list = ilCalendarUtil::_buildWeekDayList($this->seed, $user_settings->getWeekStart())->get();
452  $start = current($weekday_list);
453  $char = strtolower(mb_substr($this->lng->txt("week"), 0, 1));
454  $bucket_title .= " " . $start->get(IL_CAL_DATE) . " 1$char";
455  break;
456  case self::CAL_PRESENTATION_MONTH:
457  $year_month = $this->seed->get(IL_CAL_FKT_DATE, 'Y-m', 'UTC');
458  $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
459  $bucket_title .= " " . $year_month . " 1" . $char;
460  break;
461  case self::CAL_PRESENTATION_AGENDA_LIST:
462  $bucket_title .= " " . $this->seed->get(IL_CAL_DATE);
463  $get_list_option = intval($this->user->getPref('cal_list_view'));
464  switch ($get_list_option) {
466  break;
468  $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
469  $bucket_title .= " 1$char";
470  break;
472  $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
473  $bucket_title .= " 6$char";
474  break;
476  default:
477  $char = strtolower(mb_substr($this->lng->txt("week"), 0, 1));
478  $bucket_title .= " 1$char";
479  break;
480  }
481  }
482  return $bucket_title;
483  }
static _buildWeekDayList(ilDate $a_day, int $a_weekstart)
build week day list public
static _getInstanceByUserId(int $a_user_id)
const IL_CAL_FKT_DATE
const IL_CAL_DATE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getConsultationHoursUserId()

ilCalendarViewGUI::getConsultationHoursUserId ( )

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

References $ch_user_id.

Referenced by getAppointmentShyButton().

73  : int
74  {
75  return $this->ch_user_id;
76  }
+ 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 354 of file class.ilCalendarViewGUI.php.

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

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

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

◆ getCurrentApp()

ilCalendarViewGUI::getCurrentApp ( )

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

References getEvents(), and initAppointmentIdFromQuery().

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

148  : ?array
149  {
150  // @todo: this needs optimization
151  $events = $this->getEvents();
152  foreach ($events as $item) {
153  if ($item["event"]->getEntryId() == $this->initAppointmentIdFromQuery()) {
154  return $item;
155  }
156  }
157  return null;
158  }
+ 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 231 of file class.ilCalendarViewGUI.php.

References IL_CAL_UNIX.

Referenced by getModalForApp().

231  : array
232  {
233  $start = $item["dstart"];
234  $end = $item["dend"];
235  if ($item["fullday"]) {
236  $start = new ilDate($start, IL_CAL_UNIX);
237  $end = new ilDate($end, IL_CAL_UNIX);
238  } else {
239  $start = new ilDateTime($start, IL_CAL_UNIX);
240  $end = new ilDateTime($end, IL_CAL_UNIX);
241  }
242  return array("start" => $start, "end" => $end);
243  }
const IL_CAL_UNIX
+ Here is the caller graph for this function:

◆ getEvents()

ilCalendarViewGUI::getEvents ( )

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

References $seed, 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 countEventsInView(), downloadFiles(), getCurrentApp(), ilCalendarAgendaListGUI\getHTML(), and getModalForApp().

160  : array
161  {
162  $user = $this->user->getId();
163  $schedule = null;
164  switch ($this->presentation_type) {
165  case self::CAL_PRESENTATION_AGENDA_LIST:
166  $end_date = clone $this->seed;
169  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user, true);
170  $end_date->increment(IL_CAL_DAY, 1);
171  break;
172 
174  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
175  $end_date->increment(IL_CAL_WEEK, 1);
176  break;
177 
179  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_MONTH, $user, true);
180  $end_date->increment(IL_CAL_MONTH, 1);
181  break;
182 
184  $schedule = new ilCalendarSchedule(
185  $this->seed,
187  $user,
188  true
189  );
190  $end_date->increment(IL_CAL_MONTH, 6);
191  break;
192  default:
193  // default is week ?!
194  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
195  $end_date->increment(IL_CAL_WEEK, 1);
196  break;
197  }
198  $this->period_end_day = $end_date->get(IL_CAL_DATE);
199  $schedule->setPeriod($this->seed, $end_date);
200 
201  //}
202  /*else
203  {
204  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_PD_UPCOMING);
205  }*/
206 
207  break;
208  case self::CAL_PRESENTATION_DAY:
209  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user, true);
210  break;
211  case self::CAL_PRESENTATION_WEEK:
212  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
213  break;
214  case self::CAL_PRESENTATION_MONTH:
215  // if we put the user and true in the call method we will get only events and
216  // files from the current month. Not from 6 days before and after.
217  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_MONTH);
218  break;
219  }
220 
221  $schedule->addSubitemCalendars(true);
222  $schedule->calculate();
223  return $schedule->getScheduledEvents();
224  }
const IL_CAL_MONTH
const IL_CAL_WEEK
const IL_CAL_DAY
static getPeriod()
needed in CalendarInboxGUI to get events using a proper period.
const IL_CAL_DATE
Represents a list of calendar appointments (including recurring events) for a specific user in a give...
+ 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 249 of file class.ilCalendarViewGUI.php.

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

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

◆ getModalTitleByPlugins()

ilCalendarViewGUI::getModalTitleByPlugins ( string  $a_current_title)

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

References XapiProxy\$plugin, and getActivePlugins().

Referenced by getModalForApp().

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

◆ initAppointmentIdFromQuery()

ilCalendarViewGUI::initAppointmentIdFromQuery ( )
protected

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

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

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

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

◆ initBookingUserFromQuery()

ilCalendarViewGUI::initBookingUserFromQuery ( )
protected

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

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

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

137  : int
138  {
139  if ($this->http->wrapper()->query()->has('bkid')) {
140  return $this->http->wrapper()->query()->retrieve(
141  'bkid',
142  $this->refinery->kindlyTo()->int()
143  );
144  }
145  return 0;
146  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize()

ilCalendarViewGUI::initialize ( int  $a_calendar_presentation_type)

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

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().

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

◆ initInitialDateFromQuery()

ilCalendarViewGUI::initInitialDateFromQuery ( )
protected

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

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

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

115  : string
116  {
117  if ($this->http->wrapper()->query()->has('idate')) {
118  return $this->http->wrapper()->query()->retrieve(
119  'idate',
120  $this->refinery->kindlyTo()->string()
121  );
122  }
123  return '';
124  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initInitialDateTimeFromQuery()

ilCalendarViewGUI::initInitialDateTimeFromQuery ( )
protected

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

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

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

126  : int
127  {
128  if ($this->http->wrapper()->query()->has('dt')) {
129  return $this->http->wrapper()->query()->retrieve(
130  'dt',
131  $this->refinery->kindlyTo()->int()
132  );
133  }
134  return 0;
135  }
static http()
Fetches the global http state from ILIAS.
+ 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 68 of file class.ilCalendarViewGUI.php.

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

Field Documentation

◆ $ch_user_id

int ilCalendarViewGUI::$ch_user_id = 0
protected

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

Referenced by getConsultationHoursUserId().

◆ $component_factory

ilComponentFactory ilCalendarViewGUI::$component_factory
protected

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

◆ $ctrl

ilCtrlInterface ilCalendarViewGUI::$ctrl
protected

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

Referenced by addToolbarFileDownload().

◆ $http

HttpServices ilCalendarViewGUI::$http
protected

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

◆ $lng

ilLanguage ilCalendarViewGUI::$lng
protected

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

Referenced by addToolbarFileDownload().

◆ $logger

ilLogger ilCalendarViewGUI::$logger
protected

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

◆ $main_tpl

ilGlobalTemplateInterface ilCalendarViewGUI::$main_tpl
protected

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

◆ $period_end_day

string ilCalendarViewGUI::$period_end_day = null
protected

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

◆ $presentation_type

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

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

◆ $refinery

RefineryFactory ilCalendarViewGUI::$refinery
protected

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

◆ $seed

ilDate ilCalendarViewGUI::$seed
protected

◆ $tabs_gui

ilTabsGUI ilCalendarViewGUI::$tabs_gui
protected

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

◆ $toolbar

ilToolbarGUI ilCalendarViewGUI::$toolbar
protected

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

Referenced by addToolbarFileDownload().

◆ $tpl

ilTemplate ilCalendarViewGUI::$tpl
protected

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

◆ $ui

ILIAS DI UIServices ilCalendarViewGUI::$ui
protected

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

◆ $ui_factory

Factory ilCalendarViewGUI::$ui_factory
protected

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

Referenced by addToolbarFileDownload().

◆ $ui_renderer

Renderer ilCalendarViewGUI::$ui_renderer
protected

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

◆ $user

ilObjUser ilCalendarViewGUI::$user
protected

◆ $view_with_appointments

bool ilCalendarViewGUI::$view_with_appointments = false
protected

Definition at line 42 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 36 of file class.ilCalendarViewGUI.php.

Referenced by ilCalendarDayGUI\__construct().

◆ CAL_PRESENTATION_MONTH

const ilCalendarViewGUI::CAL_PRESENTATION_MONTH = 3

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

Referenced by ilCalendarMonthGUI\__construct().

◆ CAL_PRESENTATION_UNDEFINED

const ilCalendarViewGUI::CAL_PRESENTATION_UNDEFINED = 0

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

◆ CAL_PRESENTATION_WEEK

const ilCalendarViewGUI::CAL_PRESENTATION_WEEK = 2

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

Referenced by ilCalendarWeekGUI\__construct().


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