ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 388 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().

388  : void
389  {
391 
392  if ($settings->isBatchFileDownloadsEnabled()) {
393  $num_events = 0;
394  if ($this->presentation_type == self::CAL_PRESENTATION_AGENDA_LIST) {
395  $num_events = $this->countEventsInView();
396  }
397  if ($this->view_with_appointments || $num_events) {
400  $lng = $this->lng;
401  $ctrl = $this->ctrl;
402 
403  // file download
404  $add_button = $f->button()->standard(
405  $this->lng->txt("cal_download_files"),
406  $ctrl->getLinkTarget($this, "downloadFiles")
407  );
409  $toolbar->addComponent($add_button);
410  }
411  }
412  }
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 480 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().

480  : int
481  {
482  $start = $this->seed;
483  $end = clone $start;
484  $get_list_option = ilCalendarAgendaListGUI::getPeriod();
485  switch ($get_list_option) {
487  break;
489  $end->increment(IL_CAL_MONTH, 1);
490  break;
492  $end->increment(IL_CAL_MONTH, 6);
493  break;
495  default:
496  $end->increment(IL_CAL_DAY, 7);
497  break;
498  }
499  $events = $this->getEvents();
500  $num_events = 0;
501  foreach ($events as $event) {
502  $event_start = $event['event']->getStart()->get(IL_CAL_DATE);
503 
504  if ($event_start >= $start->get(IL_CAL_DATE) && $event_start <= $end->get(IL_CAL_DATE)) {
505  $num_events++;
506  }
507  }
508  return $num_events;
509  }
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 417 of file class.ilCalendarViewGUI.php.

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

417  : void
418  {
419  $download_job = new ilDownloadFilesBackgroundTask($this->user->getId());
420  $download_job->setBucketTitle($this->getBucketTitle());
421  $download_job->setEvents($this->getEvents());
422  if ($download_job->run()) {
423  $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('cal_download_files_started'), true);
424  }
425  $this->ctrl->redirect($this);
426  }
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 322 of file class.ilCalendarViewGUI.php.

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

322  : Iterator
323  {
324  return $this->component_factory->getActivePluginsInSlot($a_slot_id);
325  }
+ 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 289 of file class.ilCalendarViewGUI.php.

References $url, ILIAS\Repository\ctrl(), getConsultationHoursUserId(), ilCalendarEntry\getEntryId(), ilCalendarEntry\getPresentationTitle(), IL_CAL_DATE, initAppointmentIdFromQuery(), and initInitialDateTimeFromQuery().

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

293  : string {
294  $this->ctrl->setParameter($this, "app_id", $a_calendar_entry->getEntryId());
295 
296  if ($this->getConsultationHoursUserId()) {
297  $this->ctrl->setParameter($this, 'chuid', $this->getConsultationHoursUserId());
298  }
299  $this->ctrl->setParameter($this, 'dt', $a_dstart);
300  $this->ctrl->setParameter($this, 'seed', $this->seed->get(IL_CAL_DATE));
301  $url = $this->ctrl->getLinkTarget($this, "getModalForApp", "", true, false);
302  $this->ctrl->setParameter($this, "app_id", $this->initAppointmentIdFromQuery());
303  $this->ctrl->setParameter($this, "dt", $this->initInitialDateTimeFromQuery());
304  $this->ctrl->setParameter($this, 'seed', $this->seed->get(IL_CAL_DATE));
305 
306  $modal = $this->ui_factory->modal()->roundtrip('', [])->withAsyncRenderUrl($url);
307 
308  //Day view presents the titles with the full length.(agenda:class.ilCalendarAgendaListGUI.php)
309  if ($this->presentation_type == self::CAL_PRESENTATION_DAY) {
310  $title = ($a_title_forced == "") ? $a_calendar_entry->getPresentationTitle(false) : $a_title_forced;
311  } else {
312  $title = ($a_title_forced == "") ? $a_calendar_entry->getPresentationTitle() : $a_title_forced;
313  }
314  $comps = [$this->ui_factory->button()->shy($title, "#")->withOnClick($modal->getShowSignal()), $modal];
315  return $this->ui_renderer->render($comps);
316  }
getPresentationTitle(bool $a_shorten=true)
const IL_CAL_DATE
$url
+ 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 431 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().

431  : string
432  {
433  //definition of bucket titles here: 21365
434  $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
435  $bucket_title = $this->lng->txt("cal_calendar_download");
436 
437  switch ($this->presentation_type) {
438  case self::CAL_PRESENTATION_DAY:
439  $bucket_title .= " " . $this->seed->get(IL_CAL_DATE);
440  break;
441  case self::CAL_PRESENTATION_WEEK:
442  $weekday_list = ilCalendarUtil::_buildWeekDayList($this->seed, $user_settings->getWeekStart())->get();
443  $start = current($weekday_list);
444  $char = strtolower(mb_substr($this->lng->txt("week"), 0, 1));
445  $bucket_title .= " " . $start->get(IL_CAL_DATE) . " 1$char";
446  break;
447  case self::CAL_PRESENTATION_MONTH:
448  $year_month = $this->seed->get(IL_CAL_FKT_DATE, 'Y-m', 'UTC');
449  $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
450  $bucket_title .= " " . $year_month . " 1" . $char;
451  break;
452  case self::CAL_PRESENTATION_AGENDA_LIST:
453  $bucket_title .= " " . $this->seed->get(IL_CAL_DATE);
454  $get_list_option = intval($this->user->getPref('cal_list_view'));
455  switch ($get_list_option) {
457  break;
459  $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
460  $bucket_title .= " 1$char";
461  break;
463  $char = strtolower(mb_substr($this->lng->txt("month"), 0, 1));
464  $bucket_title .= " 6$char";
465  break;
467  default:
468  $char = strtolower(mb_substr($this->lng->txt("week"), 0, 1));
469  $bucket_title .= " 1$char";
470  break;
471  }
472  }
473  return $bucket_title;
474  }
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 345 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().

350  : string {
351  $content = $a_content;
352 
353  //"capg" is the plugin slot id for AppointmentCustomGrid
354  foreach ($this->getActivePlugins("capg") as $plugin) {
355  $plugin->setAppointment($a_cal_entry, new ilDateTime($a_start_date, IL_CAL_UNIX));
356 
357  if ($new_title = $plugin->editShyButtonTitle()) {
358  $a_tpl->setVariable(
359  'EVENT_CONTENT',
360  $this->getAppointmentShyButton($a_cal_entry, (string) $a_start_date, $new_title)
361  );
362  }
363 
364  if ($glyph = $plugin->addGlyph()) {
365  $a_tpl->setVariable('EXTRA_GLYPH_BY_PLUGIN', $glyph);
366  }
367 
368  if ($more_content = $plugin->addExtraContent()) {
369  $a_tpl->setVariable('EXTRA_CONTENT_BY_PLUGIN', $more_content);
370  }
371 
372  $a_tpl->parseCurrentBlock();
373  $html_content = $a_tpl->get();
374 
375  if ($new_content = $plugin->replaceContent($html_content)) {
376  $content = $new_content;
377  }
378  }
379  if ($content == $a_content) {
380  return '';
381  }
382  return $content;
383  }
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:514
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 236 of file class.ilCalendarViewGUI.php.

References IL_CAL_UNIX.

Referenced by getModalForApp().

236  : array
237  {
238  $start = $item["dstart"];
239  $end = $item["dend"];
240  if ($item["fullday"]) {
241  $start = new ilDate($start, IL_CAL_UNIX);
242  $end = new ilDate($end, IL_CAL_UNIX);
243  } else {
244  $start = new ilDateTime($start, IL_CAL_UNIX);
245  $end = new ilDateTime($end, IL_CAL_UNIX);
246  }
247  return array("start" => $start, "end" => $end);
248  }
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 
167  //if($this->period_end_day == "")
168  //{
169  $this->period = ilCalendarAgendaListGUI::getPeriod();
170 
171  $end_date = clone $this->seed;
172  switch ($this->period) {
174  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user, true);
175  $end_date->increment(IL_CAL_DAY, 1);
176  break;
177 
179  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
180  $end_date->increment(IL_CAL_WEEK, 1);
181  break;
182 
184  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_MONTH, $user, true);
185  $end_date->increment(IL_CAL_MONTH, 1);
186  break;
187 
189  $schedule = new ilCalendarSchedule(
190  $this->seed,
192  $user,
193  true
194  );
195  $end_date->increment(IL_CAL_MONTH, 6);
196  break;
197  default:
198  // default is week ?!
199  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
200  $end_date->increment(IL_CAL_WEEK, 1);
201  break;
202  }
203  $this->period_end_day = $end_date->get(IL_CAL_DATE);
204  $schedule->setPeriod($this->seed, $end_date);
205 
206  //}
207  /*else
208  {
209  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_PD_UPCOMING);
210  }*/
211 
212  break;
213  case self::CAL_PRESENTATION_DAY:
214  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user, true);
215  break;
216  case self::CAL_PRESENTATION_WEEK:
217  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $user, true);
218  break;
219  case self::CAL_PRESENTATION_MONTH:
220  // if we put the user and true in the call method we will get only events and
221  // files from the current month. Not from 6 days before and after.
222  $schedule = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_MONTH);
223  break;
224  }
225 
226  $schedule->addSubitemCalendars(true);
227  $schedule->calculate();
228  return $schedule->getScheduledEvents();
229  }
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 254 of file class.ilCalendarViewGUI.php.

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

254  : void
255  {
256  // set return class
257  $this->ctrl->setReturn($this, '');
258 
259  // @todo: this needs optimization
260  $events = $this->getEvents();
261 
262  //item => array containing ilcalendary object, dstart of the event , dend etc.
263  foreach ($events as $item) {
264  if ($item["event"]->getEntryId() == $this->initAppointmentIdFromQuery() && $item['dstart'] == $this->initInitialDateTimeFromQuery()) {
265  $dates = $this->getDatesForItem($item);
266  // content of modal
267  $next_gui = ilCalendarAppointmentPresentationGUI::_getInstance($this->seed, $item);
268  $content = $this->ctrl->getHTML($next_gui);
269 
270  //plugins can change the modal title.
271  $modal_title = ilDatePresentation::formatPeriod($dates["start"], $dates["end"]);
272  $modal_title = $this->getModalTitleByPlugins($modal_title);
273  $modal = $this->ui_factory->modal()->roundtrip(
274  $modal_title,
275  $this->ui_factory->legacy($content)
276  )->withCancelButtonLabel("close");
277  echo $this->ui_renderer->renderAsync($modal);
278  }
279  }
280  exit();
281  }
static _getInstance(ilDate $seed, array $a_app)
get singleton instance
exit
Definition: login.php:28
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 327 of file class.ilCalendarViewGUI.php.

References XapiProxy\$plugin, and getActivePlugins().

Referenced by getModalForApp().

327  : string
328  {
329  $modal_title = $a_current_title;
330  //demo of plugin execution.
331  //"capm" is the plugin slot id for Appointment presentations (modals)
332  foreach ($this->getActivePlugins("capm") as $plugin) {
333  $modal_title = ($new_title = $plugin->editModalTitle($a_current_title)) ? $new_title : $a_current_title;
334  }
335  return $modal_title;
336  }
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: