ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilCalendarSettings Class Reference

Stores all calendar relevant settings. More...

+ Collaboration diagram for ilCalendarSettings:

Public Member Functions

 useCache (bool $a_status)
 
 isCacheUsed ()
 
 setCacheMinutes (int $a_min)
 
 getCacheMinutes ()
 
 setEnabled (bool $a_enabled)
 
 isEnabled ()
 
 setDefaultWeekStart (int $a_start)
 
 getDefaultWeekStart ()
 
 getDefaultCal ()
 
 setDefaultCal (int $default_cal)
 
 getDefaultPeriod ()
 
 setDefaultPeriod (int $default_period)
 
 setDefaultTimeZone (string $a_zone)
 
 getDefaultTimeZone ()
 
 setDefaultDateFormat (int $a_format)
 
 getDefaultDateFormat ()
 
 setDefaultTimeFormat (int $a_format)
 
 getDefaultTimeFormat ()
 
 getDefaultDayStart ()
 
 setDefaultDayStart (int $a_start)
 
 getDefaultDayEnd ()
 
 setDefaultDayEnd (int $a_end)
 
 areConsultationHoursEnabled ()
 
 enableConsultationHours (bool $a_status)
 
 getCalendarSettingsId ()
 
 isSynchronisationCacheEnabled ()
 
 enableSynchronisationCache (bool $a_status)
 
 setSynchronisationCacheMinutes (int $a_min)
 
 getSynchronisationCacheMinutes ()
 
 isNotificationEnabled ()
 
 enableNotification (bool $a_status)
 
 isUserNotificationEnabled ()
 
 enableUserNotification (bool $a_not)
 
 enableCGRegistration (bool $a_status)
 
 isCGRegistrationEnabled ()
 
 enableCourseCalendar (bool $a_stat)
 
 isCourseCalendarEnabled ()
 
 isCourseCalendarVisible ()
 
 setCourseCalendarVisible (bool $status)
 
 isObjectCalendarVisible (string $type)
 
 enableGroupCalendar (bool $a_stat)
 
 isGroupCalendarEnabled ()
 
 isGroupCalendarVisible ()
 
 setGroupCalendarVisible (bool $status)
 
 enableWebCalSync (bool $a_stat)
 
 isWebCalSyncEnabled ()
 
 setWebCalSyncHours (int $a_hours)
 
 getWebCalSyncHours ()
 
 setShowWeeks (bool $a_val)
 
 getShowWeeks ()
 
 enableBatchFileDownloads (bool $a_stat)
 
 isBatchFileDownloadsEnabled ()
 
 save ()
 

Static Public Member Functions

static _getInstance ()
 
static lookupCalendarContentPresentationEnabled (int $obj_id)
 
static lookupCalendarActivated (int $a_obj_id)
 

Data Fields

const WEEK_START_MONDAY = 1
 
const WEEK_START_SUNDAY = 0
 
const DEFAULT_DAY_START = 8
 
const DEFAULT_DAY_END = 19
 
const DATE_FORMAT_UNDEFINED = 0
 
const DATE_FORMAT_DMY = 1
 
const DATE_FORMAT_YMD = 2
 
const DATE_FORMAT_MDY = 3
 
const DEFAULT_CAL_DAY = 1
 
const DEFAULT_CAL_WEEK = 2
 
const DEFAULT_CAL_MONTH = 3
 
const DEFAULT_CAL_LIST = 4
 
const TIME_FORMAT_24 = 1
 
const TIME_FORMAT_12 = 2
 
const DEFAULT_CACHE_MINUTES = 0
 
const DEFAULT_SYNC_CACHE_MINUTES = 10
 
const DEFAULT_SHOW_WEEKS = true
 

Protected Attributes

ilDBInterface $db
 
ilSetting $storage
 

Private Member Functions

 __construct ()
 
 read ()
 
 readCalendarSettingsId ()
 
 initStorage ()
 

Private Attributes

string $timezone = ilTimeZone::UTC
 
int $time_format = self::TIME_FORMAT_12
 
int $week_start = self::WEEK_START_SUNDAY
 
int $day_start = self::DEFAULT_DAY_START
 
int $day_end = self::DEFAULT_DAY_END
 
bool $enabled = false
 
int $cal_settings_id = 0
 
bool $consultation_hours = false
 
int $date_format = 0
 
int $default_cal = self::DEFAULT_CAL_LIST
 
int $default_period = 2
 
bool $cache_enabled = true
 
int $cache_minutes = 1
 
bool $sync_cache_enabled = true
 
int $sync_cache_minutes = 10
 
bool $notification = false
 
bool $notification_user = false
 
bool $cg_registration = false
 
bool $course_cal_enabled = true
 
bool $group_cal_enabled = true
 
bool $course_cal_visible = true
 
bool $group_cal_visible = true
 
bool $webcal_sync = false
 
int $webcal_sync_hours = 2
 
bool $show_weeks = false
 
bool $batch_file_downloads = false
 

Static Private Attributes

static ilCalendarSettings $instance = null
 

Detailed Description

Stores all calendar relevant settings.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 31 of file class.ilCalendarSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarSettings::__construct ( )
private

Definition at line 89 of file class.ilCalendarSettings.php.

References $DIC, initStorage(), read(), and readCalendarSettingsId().

90  {
91  global $DIC;
92 
93  $this->db = $DIC->database();
94  $this->initStorage();
95  $this->read();
96  $this->readCalendarSettingsId();
97  }
global $DIC
Definition: shib_login.php:25
+ Here is the call graph for this function:

Member Function Documentation

◆ _getInstance()

static ilCalendarSettings::_getInstance ( )
static

Definition at line 99 of file class.ilCalendarSettings.php.

Referenced by ilCalendarCache\__construct(), ilCalendarCronRemoteReader\__construct(), ilCalendarUserSettingsGUI\__construct(), ilCalendarAppointmentPanelGUI\__construct(), ilCalendarUserSettings\__construct(), ilCalendarAppointmentPresentationGUI\__construct(), ilCalendarPresentationGUI\__construct(), ilCalendarBlockGUI\__construct(), ilCalendarPresentationGUI\addStandardTabs(), ilCalendarViewGUI\addToolbarFileDownload(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), ilCalendarPresentationGUI\executeCommand(), ilAppointmentBaseFileHandler\getCatInfo(), ilObjUser\getDateFormat(), ilAppointmentPresentationGUI\getHTML(), ilCalendarAgendaListGUI\getPeriod(), ilUserStartingPointRepository\getPossibleStartingPoints(), ILIAS\GlobalScreen\Provider\Provider\CalendarMainBarProvider\getStaticSubItems(), ilObjUser\getTimeFormat(), ilObjUser\getTimeZone(), ilUserStartingPointRepository\getValidAndAccessibleStartingPointAsUrl(), ilPortfolioPageConfig\init(), ilObjCalendarSettingsGUI\initCalendarSettings(), ilCalendarAppointmentGUI\initForm(), ilCalendarCategoryGUI\initFormCategory(), ilCalendarAgendaListGUI\initPeriod(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilColumnGUI\isGloballyActivated(), ilCalendarAuthenticationToken\isIcalExpired(), lookupCalendarActivated(), ilCalendarCache\readEntry(), ilCalendarCategoryGUI\readPermissions(), ilCalendarCategories\readPublicCalendars(), ilCalendarCategories\readReposCalendars(), ilCalendarCategories\readSelectedCategories(), ilCalendarAppointmentGUI\save(), ilCalendarWeekGUI\show(), ilCalendarMonthGUI\show(), ilCalendarCache\storeEntry(), ilCalendarCache\storeUnlimitedEntry(), ilCalendarAppointmentGUI\update(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

100  {
101  if (self::$instance) {
102  return self::$instance;
103  }
104  return self::$instance = new ilCalendarSettings();
105  }
+ Here is the caller graph for this function:

◆ areConsultationHoursEnabled()

ilCalendarSettings::areConsultationHoursEnabled ( )

Definition at line 260 of file class.ilCalendarSettings.php.

References $consultation_hours.

Referenced by save().

260  : bool
261  {
263  }
+ Here is the caller graph for this function:

◆ enableBatchFileDownloads()

ilCalendarSettings::enableBatchFileDownloads ( bool  $a_stat)

Definition at line 406 of file class.ilCalendarSettings.php.

Referenced by read().

406  : void
407  {
408  $this->batch_file_downloads = $a_stat;
409  }
+ Here is the caller graph for this function:

◆ enableCGRegistration()

ilCalendarSettings::enableCGRegistration ( bool  $a_status)

Definition at line 315 of file class.ilCalendarSettings.php.

Referenced by read().

315  : void
316  {
317  $this->cg_registration = $a_status;
318  }
+ Here is the caller graph for this function:

◆ enableConsultationHours()

ilCalendarSettings::enableConsultationHours ( bool  $a_status)

Definition at line 265 of file class.ilCalendarSettings.php.

Referenced by read().

265  : void
266  {
267  $this->consultation_hours = $a_status;
268  }
+ Here is the caller graph for this function:

◆ enableCourseCalendar()

ilCalendarSettings::enableCourseCalendar ( bool  $a_stat)

Definition at line 325 of file class.ilCalendarSettings.php.

Referenced by read().

325  : void
326  {
327  $this->course_cal_enabled = $a_stat;
328  }
+ Here is the caller graph for this function:

◆ enableGroupCalendar()

ilCalendarSettings::enableGroupCalendar ( bool  $a_stat)

Definition at line 356 of file class.ilCalendarSettings.php.

Referenced by read().

356  : void
357  {
358  $this->group_cal_enabled = $a_stat;
359  }
+ Here is the caller graph for this function:

◆ enableNotification()

ilCalendarSettings::enableNotification ( bool  $a_status)

Definition at line 300 of file class.ilCalendarSettings.php.

References ILIAS\UI\examples\Symbol\Glyph\Notification\notification().

Referenced by read().

300  : void
301  {
302  $this->notification = $a_status;
303  }
notification()
description: > Example for rendring a notification glyph.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableSynchronisationCache()

ilCalendarSettings::enableSynchronisationCache ( bool  $a_status)

Definition at line 280 of file class.ilCalendarSettings.php.

Referenced by read().

280  : void
281  {
282  $this->sync_cache_enabled = $a_status;
283  }
+ Here is the caller graph for this function:

◆ enableUserNotification()

ilCalendarSettings::enableUserNotification ( bool  $a_not)

Definition at line 310 of file class.ilCalendarSettings.php.

Referenced by read().

310  : void
311  {
312  $this->notification_user = $a_not;
313  }
+ Here is the caller graph for this function:

◆ enableWebCalSync()

ilCalendarSettings::enableWebCalSync ( bool  $a_stat)

Definition at line 376 of file class.ilCalendarSettings.php.

Referenced by read().

376  : void
377  {
378  $this->webcal_sync = $a_stat;
379  }
+ Here is the caller graph for this function:

◆ getCacheMinutes()

ilCalendarSettings::getCacheMinutes ( )

Definition at line 165 of file class.ilCalendarSettings.php.

References $cache_minutes.

Referenced by save().

165  : int
166  {
167  return $this->cache_minutes;
168  }
+ Here is the caller graph for this function:

◆ getCalendarSettingsId()

ilCalendarSettings::getCalendarSettingsId ( )

Definition at line 270 of file class.ilCalendarSettings.php.

References $cal_settings_id.

270  : int
271  {
272  return $this->cal_settings_id;
273  }

◆ getDefaultCal()

ilCalendarSettings::getDefaultCal ( )

Definition at line 190 of file class.ilCalendarSettings.php.

References $default_cal.

Referenced by save().

190  : int
191  {
192  return $this->default_cal;
193  }
+ Here is the caller graph for this function:

◆ getDefaultDateFormat()

ilCalendarSettings::getDefaultDateFormat ( )

Definition at line 225 of file class.ilCalendarSettings.php.

References $date_format.

Referenced by save().

225  : int
226  {
227  return $this->date_format;
228  }
+ Here is the caller graph for this function:

◆ getDefaultDayEnd()

ilCalendarSettings::getDefaultDayEnd ( )

Definition at line 250 of file class.ilCalendarSettings.php.

References $day_end.

Referenced by save().

250  : int
251  {
252  return $this->day_end;
253  }
+ Here is the caller graph for this function:

◆ getDefaultDayStart()

ilCalendarSettings::getDefaultDayStart ( )

Definition at line 240 of file class.ilCalendarSettings.php.

References $day_start.

Referenced by save().

240  : int
241  {
242  return $this->day_start;
243  }
+ Here is the caller graph for this function:

◆ getDefaultPeriod()

ilCalendarSettings::getDefaultPeriod ( )

Definition at line 200 of file class.ilCalendarSettings.php.

References $default_period.

Referenced by save().

200  : int
201  {
202  return $this->default_period;
203  }
+ Here is the caller graph for this function:

◆ getDefaultTimeFormat()

ilCalendarSettings::getDefaultTimeFormat ( )

Definition at line 235 of file class.ilCalendarSettings.php.

References $time_format.

Referenced by save().

235  : int
236  {
237  return $this->time_format;
238  }
+ Here is the caller graph for this function:

◆ getDefaultTimeZone()

ilCalendarSettings::getDefaultTimeZone ( )

Definition at line 215 of file class.ilCalendarSettings.php.

References $timezone.

Referenced by save().

215  : string
216  {
217  return $this->timezone;
218  }
+ Here is the caller graph for this function:

◆ getDefaultWeekStart()

ilCalendarSettings::getDefaultWeekStart ( )

Definition at line 185 of file class.ilCalendarSettings.php.

References $week_start.

Referenced by save().

185  : int
186  {
187  return $this->week_start;
188  }
+ Here is the caller graph for this function:

◆ getShowWeeks()

ilCalendarSettings::getShowWeeks ( )

Definition at line 401 of file class.ilCalendarSettings.php.

References $show_weeks.

Referenced by save().

401  : bool
402  {
403  return $this->show_weeks;
404  }
+ Here is the caller graph for this function:

◆ getSynchronisationCacheMinutes()

ilCalendarSettings::getSynchronisationCacheMinutes ( )

Definition at line 290 of file class.ilCalendarSettings.php.

References $sync_cache_minutes.

Referenced by save().

290  : int
291  {
293  }
+ Here is the caller graph for this function:

◆ getWebCalSyncHours()

ilCalendarSettings::getWebCalSyncHours ( )

Definition at line 391 of file class.ilCalendarSettings.php.

References $webcal_sync_hours.

Referenced by save().

391  : int
392  {
394  }
+ Here is the caller graph for this function:

◆ initStorage()

ilCalendarSettings::initStorage ( )
private

Definition at line 513 of file class.ilCalendarSettings.php.

Referenced by __construct().

514  {
515  $this->storage = new ilSetting('calendar');
516  }
+ Here is the caller graph for this function:

◆ isBatchFileDownloadsEnabled()

ilCalendarSettings::isBatchFileDownloadsEnabled ( )

Definition at line 411 of file class.ilCalendarSettings.php.

References $batch_file_downloads.

Referenced by save().

411  : bool
412  {
414  }
+ Here is the caller graph for this function:

◆ isCacheUsed()

ilCalendarSettings::isCacheUsed ( )

Definition at line 155 of file class.ilCalendarSettings.php.

References $cache_enabled.

Referenced by save().

155  : bool
156  {
157  return $this->cache_enabled;
158  }
+ Here is the caller graph for this function:

◆ isCGRegistrationEnabled()

ilCalendarSettings::isCGRegistrationEnabled ( )

Definition at line 320 of file class.ilCalendarSettings.php.

References $cg_registration.

Referenced by save().

320  : bool
321  {
322  return $this->cg_registration;
323  }
+ Here is the caller graph for this function:

◆ isCourseCalendarEnabled()

ilCalendarSettings::isCourseCalendarEnabled ( )

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

References $course_cal_enabled.

Referenced by save().

330  : bool
331  {
333  }
+ Here is the caller graph for this function:

◆ isCourseCalendarVisible()

ilCalendarSettings::isCourseCalendarVisible ( )

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

References $course_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

335  : bool
336  {
338  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilCalendarSettings::isEnabled ( )

Definition at line 175 of file class.ilCalendarSettings.php.

References $enabled.

Referenced by lookupCalendarActivated(), and save().

175  : bool
176  {
177  return $this->enabled;
178  }
+ Here is the caller graph for this function:

◆ isGroupCalendarEnabled()

ilCalendarSettings::isGroupCalendarEnabled ( )

Definition at line 361 of file class.ilCalendarSettings.php.

References $group_cal_enabled.

Referenced by save().

361  : bool
362  {
364  }
+ Here is the caller graph for this function:

◆ isGroupCalendarVisible()

ilCalendarSettings::isGroupCalendarVisible ( )

Definition at line 366 of file class.ilCalendarSettings.php.

References $group_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

366  : bool
367  {
369  }
+ Here is the caller graph for this function:

◆ isNotificationEnabled()

ilCalendarSettings::isNotificationEnabled ( )

Definition at line 295 of file class.ilCalendarSettings.php.

References $notification.

Referenced by save().

295  : bool
296  {
297  return $this->notification;
298  }
+ Here is the caller graph for this function:

◆ isObjectCalendarVisible()

ilCalendarSettings::isObjectCalendarVisible ( string  $type)

Definition at line 345 of file class.ilCalendarSettings.php.

References isCourseCalendarVisible(), and isGroupCalendarVisible().

345  : bool
346  {
347  switch ($type) {
348  case 'crs':
349  return $this->isCourseCalendarVisible();
350  case 'grp':
351  return $this->isGroupCalendarVisible();
352  }
353  return false;
354  }
+ Here is the call graph for this function:

◆ isSynchronisationCacheEnabled()

ilCalendarSettings::isSynchronisationCacheEnabled ( )

Definition at line 275 of file class.ilCalendarSettings.php.

References $sync_cache_enabled.

Referenced by save().

275  : bool
276  {
278  }
+ Here is the caller graph for this function:

◆ isUserNotificationEnabled()

ilCalendarSettings::isUserNotificationEnabled ( )

Definition at line 305 of file class.ilCalendarSettings.php.

References $notification_user.

Referenced by save().

305  : bool
306  {
308  }
+ Here is the caller graph for this function:

◆ isWebCalSyncEnabled()

ilCalendarSettings::isWebCalSyncEnabled ( )

Definition at line 381 of file class.ilCalendarSettings.php.

References $webcal_sync.

Referenced by save().

381  : bool
382  {
383  return $this->webcal_sync;
384  }
+ Here is the caller graph for this function:

◆ lookupCalendarActivated()

static ilCalendarSettings::lookupCalendarActivated ( int  $a_obj_id)
static

Definition at line 122 of file class.ilCalendarSettings.php.

References _getInstance(), ilContainer\_lookupContainerSetting(), ilObject\_lookupType(), and isEnabled().

Referenced by ilObjectServiceSettingsGUI\initServiceSettingsForm().

122  : bool
123  {
125  return false;
126  }
127  $type = ilObject::_lookupType($a_obj_id);
128  // lookup global setting
129  $gl_activated = false;
130  switch ($type) {
131  case 'crs':
132  $gl_activated = ilCalendarSettings::_getInstance()->isCourseCalendarEnabled();
133  break;
134 
135  case 'grp':
136  $gl_activated = ilCalendarSettings::_getInstance()->isGroupCalendarEnabled();
137  break;
138 
139  default:
140  return false;
141  }
142  // look individual object setting
144  $a_obj_id,
145  'cont_activation_calendar',
146  (string) $gl_activated
147  );
148  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupCalendarContentPresentationEnabled()

static ilCalendarSettings::lookupCalendarContentPresentationEnabled ( int  $obj_id)
static

Definition at line 107 of file class.ilCalendarSettings.php.

References ilContainer\_lookupContainerSetting(), and ilObject\_lookupType().

Referenced by ilObjectServiceSettingsGUI\initServiceSettingsForm(), and ilColumnGUI\isGloballyActivated().

107  : bool
108  {
109  if (!self::lookupCalendarActivated($obj_id)) {
110  return false;
111  }
112  $settings = self::_getInstance();
113  $type = ilObject::_lookupType($obj_id);
114  $default = $settings->isObjectCalendarVisible($type);
116  $obj_id,
117  'cont_show_calendar',
118  (string) $default
119  );
120  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilCalendarSettings::read ( )
private

Definition at line 445 of file class.ilCalendarSettings.php.

References ilTimeZone\_getDefaultTimeZone(), enableBatchFileDownloads(), enableCGRegistration(), enableConsultationHours(), enableCourseCalendar(), enableGroupCalendar(), enableNotification(), enableSynchronisationCache(), enableUserNotification(), enableWebCalSync(), setCacheMinutes(), setCourseCalendarVisible(), setDefaultCal(), setDefaultDateFormat(), setDefaultDayEnd(), setDefaultDayStart(), setDefaultPeriod(), setDefaultTimeFormat(), setDefaultTimeZone(), setDefaultWeekStart(), setEnabled(), setGroupCalendarVisible(), setShowWeeks(), setSynchronisationCacheMinutes(), setWebCalSyncHours(), and useCache().

Referenced by __construct().

446  {
447  $this->setEnabled((bool) $this->storage->get('enabled'));
448  $this->setDefaultTimeZone($this->storage->get('default_timezone', ilTimeZone::_getDefaultTimeZone()));
449  $this->setDefaultWeekStart((int) $this->storage->get('default_week_start', (string) self::WEEK_START_MONDAY));
450  $this->setDefaultDateFormat((int) $this->storage->get('default_date_format', (string) self::DATE_FORMAT_DMY));
451  $this->setDefaultTimeFormat((int) $this->storage->get('default_time_format', (string) self::TIME_FORMAT_24));
452  $this->setDefaultDayStart((int) $this->storage->get('default_day_start', (string) self::DEFAULT_DAY_START));
453  $this->setDefaultDayEnd((int) $this->storage->get('default_day_end', (string) self::DEFAULT_DAY_END));
454  $this->useCache((bool) $this->storage->get('cache_enabled', (string) $this->cache_enabled));
455  $this->setCacheMinutes((int) $this->storage->get('cache_minutes', (string) self::DEFAULT_CACHE_MINUTES));
456  $this->enableSynchronisationCache((bool) $this->storage->get(
457  'sync_cache_enabled',
458  (string) $this->isSynchronisationCacheEnabled()
459  ));
460  $this->setSynchronisationCacheMinutes((int) $this->storage->get(
461  'sync_cache_minutes',
462  (string) self::DEFAULT_SYNC_CACHE_MINUTES
463  ));
464  $this->enableNotification((bool) $this->storage->get('notification', (string) $this->isNotificationEnabled()));
465  $this->enableConsultationHours((bool) $this->storage->get(
466  'consultation_hours',
467  (string) $this->areConsultationHoursEnabled()
468  ));
469  $this->enableCGRegistration((bool) $this->storage->get(
470  'cg_registration',
471  (string) $this->isCGRegistrationEnabled()
472  ));
473  $this->enableCourseCalendar((bool) $this->storage->get(
474  'course_cal',
475  (string) $this->isCourseCalendarEnabled()
476  ));
477  $this->setCourseCalendarVisible((bool) $this->storage->get(
478  'course_cal_visible',
479  (string) $this->isCourseCalendarVisible()
480  ));
481  $this->enableGroupCalendar((bool) $this->storage->get('group_cal', (string) $this->isGroupCalendarEnabled()));
482  $this->setGroupCalendarVisible((bool) $this->storage->get(
483  'group_cal_visible',
484  (string) $this->isGroupCalendarVisible()
485  ));
486  $this->enableUserNotification((bool) $this->storage->get(
487  'notification_user',
488  (string) $this->isUserNotificationEnabled()
489  ));
490  $this->enableWebCalSync((bool) $this->storage->get('webcal_sync', (string) $this->isWebCalSyncEnabled()));
491  $this->setWebCalSyncHours((int) $this->storage->get('webcal_sync_hours', (string) $this->getWebCalSyncHours()));
492  $this->setShowWeeks((bool) $this->storage->get('show_weeks', (string) $this->getShowWeeks()));
493  $this->enableBatchFileDownloads((bool) $this->storage->get(
494  'batch_files',
495  (string) $this->isBatchFileDownloadsEnabled()
496  ));
497  $this->setDefaultCal((int) $this->storage->get('default_calendar_view', (string) $this->getDefaultCal()));
498  $this->setDefaultPeriod((int) $this->storage->get('default_period', (string) $this->getDefaultPeriod()));
499  }
static _getDefaultTimeZone()
Calculate and set default time zone.
setDefaultTimeZone(string $a_zone)
enableConsultationHours(bool $a_status)
enableBatchFileDownloads(bool $a_stat)
enableSynchronisationCache(bool $a_status)
setCourseCalendarVisible(bool $status)
setDefaultPeriod(int $default_period)
enableCGRegistration(bool $a_status)
enableNotification(bool $a_status)
setDefaultCal(int $default_cal)
setSynchronisationCacheMinutes(int $a_min)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCalendarSettingsId()

ilCalendarSettings::readCalendarSettingsId ( )
private

Definition at line 501 of file class.ilCalendarSettings.php.

References ILIAS\Repository\int().

Referenced by __construct().

501  : void
502  {
503  $query = "SELECT ref_id FROM object_reference obr " .
504  "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
505  "WHERE type = 'cals'";
506 
507  $set = $this->db->query($query);
508  $row = $this->db->fetchAssoc($set);
509 
510  $this->cal_settings_id = (int) $row["ref_id"];
511  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilCalendarSettings::save ( )

Definition at line 416 of file class.ilCalendarSettings.php.

References areConsultationHoursEnabled(), getCacheMinutes(), getDefaultCal(), getDefaultDateFormat(), getDefaultDayEnd(), getDefaultDayStart(), getDefaultPeriod(), getDefaultTimeFormat(), getDefaultTimeZone(), getDefaultWeekStart(), getShowWeeks(), getSynchronisationCacheMinutes(), getWebCalSyncHours(), isBatchFileDownloadsEnabled(), isCacheUsed(), isCGRegistrationEnabled(), isCourseCalendarEnabled(), isCourseCalendarVisible(), isEnabled(), isGroupCalendarEnabled(), isGroupCalendarVisible(), isNotificationEnabled(), isSynchronisationCacheEnabled(), isUserNotificationEnabled(), and isWebCalSyncEnabled().

417  {
418  $this->storage->set('enabled', (string) (int) $this->isEnabled());
419  $this->storage->set('default_timezone', $this->getDefaultTimeZone());
420  $this->storage->set('default_week_start', (string) $this->getDefaultWeekStart());
421  $this->storage->set('default_date_format', (string) $this->getDefaultDateFormat());
422  $this->storage->set('default_time_format', (string) $this->getDefaultTimeFormat());
423  $this->storage->set('default_day_start', (string) $this->getDefaultDayStart());
424  $this->storage->set('default_day_end', (string) $this->getDefaultDayEnd());
425  $this->storage->set('cache_minutes', (string) $this->getCacheMinutes());
426  $this->storage->set('sync_cache_enabled', (string) (int) $this->isSynchronisationCacheEnabled());
427  $this->storage->set('sync_cache_minutes', (string) $this->getSynchronisationCacheMinutes());
428  $this->storage->set('cache_enabled', (string) (int) $this->isCacheUsed());
429  $this->storage->set('notification', (string) (int) $this->isNotificationEnabled());
430  $this->storage->set('consultation_hours', (string) (int) $this->areConsultationHoursEnabled());
431  $this->storage->set('cg_registration', (string) (int) $this->isCGRegistrationEnabled());
432  $this->storage->set('course_cal', (string) (int) $this->isCourseCalendarEnabled());
433  $this->storage->set('course_cal_visible', (string) (int) $this->isCourseCalendarVisible());
434  $this->storage->set('group_cal', (string) (int) $this->isGroupCalendarEnabled());
435  $this->storage->set('group_cal_visible', (string) (int) $this->isGroupCalendarVisible());
436  $this->storage->set('notification_user', (string) (int) $this->isUserNotificationEnabled());
437  $this->storage->set('webcal_sync', (string) (int) $this->isWebCalSyncEnabled());
438  $this->storage->set('webcal_sync_hours', (string) $this->getWebCalSyncHours());
439  $this->storage->set('show_weeks', (string) (int) $this->getShowWeeks());
440  $this->storage->set('batch_files', (string) (int) $this->isBatchFileDownloadsEnabled());
441  $this->storage->set('default_calendar_view', (string) $this->getDefaultCal());
442  $this->storage->set('default_period', (string) $this->getDefaultPeriod());
443  }
+ Here is the call graph for this function:

◆ setCacheMinutes()

ilCalendarSettings::setCacheMinutes ( int  $a_min)

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

Referenced by read().

160  : void
161  {
162  $this->cache_minutes = $a_min;
163  }
+ Here is the caller graph for this function:

◆ setCourseCalendarVisible()

ilCalendarSettings::setCourseCalendarVisible ( bool  $status)

Definition at line 340 of file class.ilCalendarSettings.php.

Referenced by read().

340  : void
341  {
342  $this->course_cal_visible = $status;
343  }
+ Here is the caller graph for this function:

◆ setDefaultCal()

ilCalendarSettings::setDefaultCal ( int  $default_cal)

Definition at line 195 of file class.ilCalendarSettings.php.

References $default_cal.

Referenced by read().

195  : void
196  {
197  $this->default_cal = $default_cal;
198  }
+ Here is the caller graph for this function:

◆ setDefaultDateFormat()

ilCalendarSettings::setDefaultDateFormat ( int  $a_format)

Definition at line 220 of file class.ilCalendarSettings.php.

Referenced by read().

220  : void
221  {
222  $this->date_format = $a_format;
223  }
+ Here is the caller graph for this function:

◆ setDefaultDayEnd()

ilCalendarSettings::setDefaultDayEnd ( int  $a_end)

Definition at line 255 of file class.ilCalendarSettings.php.

Referenced by read().

255  : void
256  {
257  $this->day_end = $a_end;
258  }
+ Here is the caller graph for this function:

◆ setDefaultDayStart()

ilCalendarSettings::setDefaultDayStart ( int  $a_start)

Definition at line 245 of file class.ilCalendarSettings.php.

Referenced by read().

245  : void
246  {
247  $this->day_start = $a_start;
248  }
+ Here is the caller graph for this function:

◆ setDefaultPeriod()

ilCalendarSettings::setDefaultPeriod ( int  $default_period)

Definition at line 205 of file class.ilCalendarSettings.php.

References $default_period.

Referenced by read().

205  : void
206  {
207  $this->default_period = $default_period;
208  }
+ Here is the caller graph for this function:

◆ setDefaultTimeFormat()

ilCalendarSettings::setDefaultTimeFormat ( int  $a_format)

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

Referenced by read().

230  : void
231  {
232  $this->time_format = $a_format;
233  }
+ Here is the caller graph for this function:

◆ setDefaultTimeZone()

ilCalendarSettings::setDefaultTimeZone ( string  $a_zone)

Definition at line 210 of file class.ilCalendarSettings.php.

Referenced by read().

210  : void
211  {
212  $this->timezone = $a_zone;
213  }
+ Here is the caller graph for this function:

◆ setDefaultWeekStart()

ilCalendarSettings::setDefaultWeekStart ( int  $a_start)

Definition at line 180 of file class.ilCalendarSettings.php.

Referenced by read().

180  : void
181  {
182  $this->week_start = $a_start;
183  }
+ Here is the caller graph for this function:

◆ setEnabled()

ilCalendarSettings::setEnabled ( bool  $a_enabled)

Definition at line 170 of file class.ilCalendarSettings.php.

Referenced by read().

170  : void
171  {
172  $this->enabled = $a_enabled;
173  }
+ Here is the caller graph for this function:

◆ setGroupCalendarVisible()

ilCalendarSettings::setGroupCalendarVisible ( bool  $status)

Definition at line 371 of file class.ilCalendarSettings.php.

Referenced by read().

371  : void
372  {
373  $this->group_cal_visible = $status;
374  }
+ Here is the caller graph for this function:

◆ setShowWeeks()

ilCalendarSettings::setShowWeeks ( bool  $a_val)

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

Referenced by read().

396  : void
397  {
398  $this->show_weeks = $a_val;
399  }
+ Here is the caller graph for this function:

◆ setSynchronisationCacheMinutes()

ilCalendarSettings::setSynchronisationCacheMinutes ( int  $a_min)

Definition at line 285 of file class.ilCalendarSettings.php.

Referenced by read().

285  : void
286  {
287  $this->sync_cache_minutes = $a_min;
288  }
+ Here is the caller graph for this function:

◆ setWebCalSyncHours()

ilCalendarSettings::setWebCalSyncHours ( int  $a_hours)

Definition at line 386 of file class.ilCalendarSettings.php.

Referenced by read().

386  : void
387  {
388  $this->webcal_sync_hours = $a_hours;
389  }
+ Here is the caller graph for this function:

◆ useCache()

ilCalendarSettings::useCache ( bool  $a_status)

Definition at line 150 of file class.ilCalendarSettings.php.

Referenced by read().

150  : void
151  {
152  $this->cache_enabled = $a_status;
153  }
+ Here is the caller graph for this function:

Field Documentation

◆ $batch_file_downloads

bool ilCalendarSettings::$batch_file_downloads = false
private

Definition at line 87 of file class.ilCalendarSettings.php.

Referenced by isBatchFileDownloadsEnabled().

◆ $cache_enabled

bool ilCalendarSettings::$cache_enabled = true
private

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

Referenced by isCacheUsed().

◆ $cache_minutes

int ilCalendarSettings::$cache_minutes = 1
private

Definition at line 74 of file class.ilCalendarSettings.php.

Referenced by getCacheMinutes().

◆ $cal_settings_id

int ilCalendarSettings::$cal_settings_id = 0
private

Definition at line 68 of file class.ilCalendarSettings.php.

Referenced by getCalendarSettingsId().

◆ $cg_registration

bool ilCalendarSettings::$cg_registration = false
private

Definition at line 79 of file class.ilCalendarSettings.php.

Referenced by isCGRegistrationEnabled().

◆ $consultation_hours

bool ilCalendarSettings::$consultation_hours = false
private

Definition at line 69 of file class.ilCalendarSettings.php.

Referenced by areConsultationHoursEnabled().

◆ $course_cal_enabled

bool ilCalendarSettings::$course_cal_enabled = true
private

Definition at line 80 of file class.ilCalendarSettings.php.

Referenced by isCourseCalendarEnabled().

◆ $course_cal_visible

bool ilCalendarSettings::$course_cal_visible = true
private

Definition at line 82 of file class.ilCalendarSettings.php.

Referenced by isCourseCalendarVisible().

◆ $date_format

int ilCalendarSettings::$date_format = 0
private

Definition at line 70 of file class.ilCalendarSettings.php.

Referenced by getDefaultDateFormat().

◆ $day_end

int ilCalendarSettings::$day_end = self::DEFAULT_DAY_END
private

Definition at line 66 of file class.ilCalendarSettings.php.

Referenced by getDefaultDayEnd().

◆ $day_start

int ilCalendarSettings::$day_start = self::DEFAULT_DAY_START
private

Definition at line 65 of file class.ilCalendarSettings.php.

Referenced by getDefaultDayStart().

◆ $db

ilDBInterface ilCalendarSettings::$db
protected

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

◆ $default_cal

int ilCalendarSettings::$default_cal = self::DEFAULT_CAL_LIST
private

Definition at line 71 of file class.ilCalendarSettings.php.

Referenced by getDefaultCal(), and setDefaultCal().

◆ $default_period

int ilCalendarSettings::$default_period = 2
private

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

Referenced by getDefaultPeriod(), and setDefaultPeriod().

◆ $enabled

bool ilCalendarSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $group_cal_enabled

bool ilCalendarSettings::$group_cal_enabled = true
private

Definition at line 81 of file class.ilCalendarSettings.php.

Referenced by isGroupCalendarEnabled().

◆ $group_cal_visible

bool ilCalendarSettings::$group_cal_visible = true
private

Definition at line 83 of file class.ilCalendarSettings.php.

Referenced by isGroupCalendarVisible().

◆ $instance

ilCalendarSettings ilCalendarSettings::$instance = null
staticprivate

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

◆ $notification

bool ilCalendarSettings::$notification = false
private

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

Referenced by isNotificationEnabled().

◆ $notification_user

bool ilCalendarSettings::$notification_user = false
private

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

Referenced by isUserNotificationEnabled().

◆ $show_weeks

bool ilCalendarSettings::$show_weeks = false
private

Definition at line 86 of file class.ilCalendarSettings.php.

Referenced by getShowWeeks().

◆ $storage

ilSetting ilCalendarSettings::$storage
protected

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

◆ $sync_cache_enabled

bool ilCalendarSettings::$sync_cache_enabled = true
private

Definition at line 75 of file class.ilCalendarSettings.php.

Referenced by isSynchronisationCacheEnabled().

◆ $sync_cache_minutes

int ilCalendarSettings::$sync_cache_minutes = 10
private

Definition at line 76 of file class.ilCalendarSettings.php.

Referenced by getSynchronisationCacheMinutes().

◆ $time_format

int ilCalendarSettings::$time_format = self::TIME_FORMAT_12
private

Definition at line 63 of file class.ilCalendarSettings.php.

Referenced by getDefaultTimeFormat().

◆ $timezone

string ilCalendarSettings::$timezone = ilTimeZone::UTC
private

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

Referenced by getDefaultTimeZone().

◆ $webcal_sync

bool ilCalendarSettings::$webcal_sync = false
private

Definition at line 84 of file class.ilCalendarSettings.php.

Referenced by isWebCalSyncEnabled().

◆ $webcal_sync_hours

int ilCalendarSettings::$webcal_sync_hours = 2
private

Definition at line 85 of file class.ilCalendarSettings.php.

Referenced by getWebCalSyncHours().

◆ $week_start

int ilCalendarSettings::$week_start = self::WEEK_START_SUNDAY
private

Definition at line 64 of file class.ilCalendarSettings.php.

Referenced by getDefaultWeekStart().

◆ DATE_FORMAT_DMY

◆ DATE_FORMAT_MDY

◆ DATE_FORMAT_UNDEFINED

const ilCalendarSettings::DATE_FORMAT_UNDEFINED = 0

Definition at line 39 of file class.ilCalendarSettings.php.

◆ DATE_FORMAT_YMD

◆ DEFAULT_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_CACHE_MINUTES = 0

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

◆ DEFAULT_CAL_DAY

◆ DEFAULT_CAL_LIST

◆ DEFAULT_CAL_MONTH

◆ DEFAULT_CAL_WEEK

◆ DEFAULT_DAY_END

const ilCalendarSettings::DEFAULT_DAY_END = 19

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

◆ DEFAULT_DAY_START

const ilCalendarSettings::DEFAULT_DAY_START = 8

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

◆ DEFAULT_SHOW_WEEKS

const ilCalendarSettings::DEFAULT_SHOW_WEEKS = true

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

◆ DEFAULT_SYNC_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_SYNC_CACHE_MINUTES = 10

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

◆ TIME_FORMAT_12

◆ TIME_FORMAT_24

◆ WEEK_START_MONDAY

const ilCalendarSettings::WEEK_START_MONDAY = 1

◆ WEEK_START_SUNDAY

const ilCalendarSettings::WEEK_START_SUNDAY = 0

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

Referenced by ilCalendarSchedule\initPeriod().


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