ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 25 of file class.ilCalendarSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilCalendarSettings::__construct ( )
private

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

84 {
85 global $DIC;
86
87 $this->db = $DIC->database();
88 $this->initStorage();
89 $this->read();
91 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _getInstance()

static ilCalendarSettings::_getInstance ( )
static

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

94 {
95 if (self::$instance) {
96 return self::$instance;
97 }
98 return self::$instance = new ilCalendarSettings();
99 }
Stores all calendar relevant settings.
static ilCalendarSettings $instance

References $instance.

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

+ Here is the caller graph for this function:

◆ areConsultationHoursEnabled()

ilCalendarSettings::areConsultationHoursEnabled ( )

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

254 : bool
255 {
257 }

References $consultation_hours.

Referenced by save().

+ Here is the caller graph for this function:

◆ enableBatchFileDownloads()

ilCalendarSettings::enableBatchFileDownloads ( bool  $a_stat)

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

400 : void
401 {
402 $this->batch_file_downloads = $a_stat;
403 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableCGRegistration()

ilCalendarSettings::enableCGRegistration ( bool  $a_status)

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

309 : void
310 {
311 $this->cg_registration = $a_status;
312 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableConsultationHours()

ilCalendarSettings::enableConsultationHours ( bool  $a_status)

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

259 : void
260 {
261 $this->consultation_hours = $a_status;
262 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableCourseCalendar()

ilCalendarSettings::enableCourseCalendar ( bool  $a_stat)

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

319 : void
320 {
321 $this->course_cal_enabled = $a_stat;
322 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableGroupCalendar()

ilCalendarSettings::enableGroupCalendar ( bool  $a_stat)

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

350 : void
351 {
352 $this->group_cal_enabled = $a_stat;
353 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableNotification()

ilCalendarSettings::enableNotification ( bool  $a_status)

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

294 : void
295 {
296 $this->notification = $a_status;
297 }

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

Referenced by read().

+ 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 274 of file class.ilCalendarSettings.php.

274 : void
275 {
276 $this->sync_cache_enabled = $a_status;
277 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableUserNotification()

ilCalendarSettings::enableUserNotification ( bool  $a_not)

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

304 : void
305 {
306 $this->notification_user = $a_not;
307 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableWebCalSync()

ilCalendarSettings::enableWebCalSync ( bool  $a_stat)

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

370 : void
371 {
372 $this->webcal_sync = $a_stat;
373 }

Referenced by read().

+ Here is the caller graph for this function:

◆ getCacheMinutes()

ilCalendarSettings::getCacheMinutes ( )

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

159 : int
160 {
162 }

References $cache_minutes.

Referenced by save().

+ Here is the caller graph for this function:

◆ getCalendarSettingsId()

ilCalendarSettings::getCalendarSettingsId ( )

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

264 : int
265 {
267 }

References $cal_settings_id.

◆ getDefaultCal()

ilCalendarSettings::getDefaultCal ( )

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

184 : int
185 {
186 return $this->default_cal;
187 }

References $default_cal.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultDateFormat()

ilCalendarSettings::getDefaultDateFormat ( )

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

219 : int
220 {
221 return $this->date_format;
222 }

References $date_format.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultDayEnd()

ilCalendarSettings::getDefaultDayEnd ( )

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

244 : int
245 {
246 return $this->day_end;
247 }

References $day_end.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultDayStart()

ilCalendarSettings::getDefaultDayStart ( )

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

234 : int
235 {
236 return $this->day_start;
237 }

References $day_start.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultPeriod()

ilCalendarSettings::getDefaultPeriod ( )

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

194 : int
195 {
197 }

References $default_period.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultTimeFormat()

ilCalendarSettings::getDefaultTimeFormat ( )

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

229 : int
230 {
231 return $this->time_format;
232 }

References $time_format.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultTimeZone()

ilCalendarSettings::getDefaultTimeZone ( )

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

209 : string
210 {
211 return $this->timezone;
212 }

References $timezone.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultWeekStart()

ilCalendarSettings::getDefaultWeekStart ( )

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

179 : int
180 {
181 return $this->week_start;
182 }

References $week_start.

Referenced by save().

+ Here is the caller graph for this function:

◆ getShowWeeks()

ilCalendarSettings::getShowWeeks ( )

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

395 : bool
396 {
397 return $this->show_weeks;
398 }

References $show_weeks.

Referenced by save().

+ Here is the caller graph for this function:

◆ getSynchronisationCacheMinutes()

ilCalendarSettings::getSynchronisationCacheMinutes ( )

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

284 : int
285 {
287 }

References $sync_cache_minutes.

Referenced by save().

+ Here is the caller graph for this function:

◆ getWebCalSyncHours()

ilCalendarSettings::getWebCalSyncHours ( )

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

385 : int
386 {
388 }

References $webcal_sync_hours.

Referenced by save().

+ Here is the caller graph for this function:

◆ initStorage()

ilCalendarSettings::initStorage ( )
private

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

508 {
509 $this->storage = new ilSetting('calendar');
510 }
ILIAS Setting Class.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ isBatchFileDownloadsEnabled()

ilCalendarSettings::isBatchFileDownloadsEnabled ( )

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

405 : bool
406 {
408 }

References $batch_file_downloads.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCacheUsed()

ilCalendarSettings::isCacheUsed ( )

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

149 : bool
150 {
152 }

References $cache_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCGRegistrationEnabled()

ilCalendarSettings::isCGRegistrationEnabled ( )

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

314 : bool
315 {
317 }

References $cg_registration.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCourseCalendarEnabled()

ilCalendarSettings::isCourseCalendarEnabled ( )

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

324 : bool
325 {
327 }

References $course_cal_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCourseCalendarVisible()

ilCalendarSettings::isCourseCalendarVisible ( )

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

329 : bool
330 {
332 }

References $course_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

+ Here is the caller graph for this function:

◆ isEnabled()

ilCalendarSettings::isEnabled ( )

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

169 : bool
170 {
171 return $this->enabled;
172 }

References $enabled.

Referenced by lookupCalendarActivated(), and save().

+ Here is the caller graph for this function:

◆ isGroupCalendarEnabled()

ilCalendarSettings::isGroupCalendarEnabled ( )

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

355 : bool
356 {
358 }

References $group_cal_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isGroupCalendarVisible()

ilCalendarSettings::isGroupCalendarVisible ( )

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

360 : bool
361 {
363 }

References $group_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

+ Here is the caller graph for this function:

◆ isNotificationEnabled()

ilCalendarSettings::isNotificationEnabled ( )

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

289 : bool
290 {
291 return $this->notification;
292 }

References $notification.

Referenced by save().

+ Here is the caller graph for this function:

◆ isObjectCalendarVisible()

ilCalendarSettings::isObjectCalendarVisible ( string  $type)

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

339 : bool
340 {
341 switch ($type) {
342 case 'crs':
343 return $this->isCourseCalendarVisible();
344 case 'grp':
345 return $this->isGroupCalendarVisible();
346 }
347 return false;
348 }

References isCourseCalendarVisible(), and isGroupCalendarVisible().

+ Here is the call graph for this function:

◆ isSynchronisationCacheEnabled()

ilCalendarSettings::isSynchronisationCacheEnabled ( )

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

269 : bool
270 {
272 }

References $sync_cache_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isUserNotificationEnabled()

ilCalendarSettings::isUserNotificationEnabled ( )

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

299 : bool
300 {
302 }

References $notification_user.

Referenced by save().

+ Here is the caller graph for this function:

◆ isWebCalSyncEnabled()

ilCalendarSettings::isWebCalSyncEnabled ( )

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

375 : bool
376 {
377 return $this->webcal_sync;
378 }

References $webcal_sync.

Referenced by save().

+ Here is the caller graph for this function:

◆ lookupCalendarActivated()

static ilCalendarSettings::lookupCalendarActivated ( int  $a_obj_id)
static

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

116 : bool
117 {
119 return false;
120 }
121 $type = ilObject::_lookupType($a_obj_id);
122 // lookup global setting
123 $gl_activated = false;
124 switch ($type) {
125 case 'crs':
126 $gl_activated = ilCalendarSettings::_getInstance()->isCourseCalendarEnabled();
127 break;
128
129 case 'grp':
130 $gl_activated = ilCalendarSettings::_getInstance()->isGroupCalendarEnabled();
131 break;
132
133 default:
134 return false;
135 }
136 // look individual object setting
138 $a_obj_id,
139 'cont_activation_calendar',
140 (string) $gl_activated
141 );
142 }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _lookupType(int $id, bool $reference=false)

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

+ Here is the call graph for this function:

◆ lookupCalendarContentPresentationEnabled()

static ilCalendarSettings::lookupCalendarContentPresentationEnabled ( int  $obj_id)
static

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

101 : bool
102 {
103 if (!self::lookupCalendarActivated($obj_id)) {
104 return false;
105 }
106 $settings = self::_getInstance();
107 $type = ilObject::_lookupType($obj_id);
108 $default = $settings->isObjectCalendarVisible($type);
110 $obj_id,
111 'cont_show_calendar',
112 (string) $default
113 );
114 }

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

+ Here is the call graph for this function:

◆ read()

ilCalendarSettings::read ( )
private

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

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

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

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

◆ readCalendarSettingsId()

ilCalendarSettings::readCalendarSettingsId ( )
private

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

495 : void
496 {
497 $query = "SELECT ref_id FROM object_reference obr " .
498 "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
499 "WHERE type = 'cals'";
500
501 $set = $this->db->query($query);
502 $row = $this->db->fetchAssoc($set);
503
504 $this->cal_settings_id = (int) $row["ref_id"];
505 }

References ILIAS\Repository\int().

Referenced by __construct().

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

◆ save()

ilCalendarSettings::save ( )

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

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

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

+ Here is the call graph for this function:

◆ setCacheMinutes()

ilCalendarSettings::setCacheMinutes ( int  $a_min)

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

154 : void
155 {
156 $this->cache_minutes = $a_min;
157 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setCourseCalendarVisible()

ilCalendarSettings::setCourseCalendarVisible ( bool  $status)

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

334 : void
335 {
336 $this->course_cal_visible = $status;
337 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultCal()

ilCalendarSettings::setDefaultCal ( int  $default_cal)

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

189 : void
190 {
191 $this->default_cal = $default_cal;
192 }

References $default_cal.

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultDateFormat()

ilCalendarSettings::setDefaultDateFormat ( int  $a_format)

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

214 : void
215 {
216 $this->date_format = $a_format;
217 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultDayEnd()

ilCalendarSettings::setDefaultDayEnd ( int  $a_end)

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

249 : void
250 {
251 $this->day_end = $a_end;
252 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultDayStart()

ilCalendarSettings::setDefaultDayStart ( int  $a_start)

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

239 : void
240 {
241 $this->day_start = $a_start;
242 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultPeriod()

ilCalendarSettings::setDefaultPeriod ( int  $default_period)

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

199 : void
200 {
201 $this->default_period = $default_period;
202 }

References $default_period.

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultTimeFormat()

ilCalendarSettings::setDefaultTimeFormat ( int  $a_format)

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

224 : void
225 {
226 $this->time_format = $a_format;
227 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultTimeZone()

ilCalendarSettings::setDefaultTimeZone ( string  $a_zone)

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

204 : void
205 {
206 $this->timezone = $a_zone;
207 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultWeekStart()

ilCalendarSettings::setDefaultWeekStart ( int  $a_start)

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

174 : void
175 {
176 $this->week_start = $a_start;
177 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setEnabled()

ilCalendarSettings::setEnabled ( bool  $a_enabled)

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

164 : void
165 {
166 $this->enabled = $a_enabled;
167 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupCalendarVisible()

ilCalendarSettings::setGroupCalendarVisible ( bool  $status)

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

365 : void
366 {
367 $this->group_cal_visible = $status;
368 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setShowWeeks()

ilCalendarSettings::setShowWeeks ( bool  $a_val)

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

390 : void
391 {
392 $this->show_weeks = $a_val;
393 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSynchronisationCacheMinutes()

ilCalendarSettings::setSynchronisationCacheMinutes ( int  $a_min)

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

279 : void
280 {
281 $this->sync_cache_minutes = $a_min;
282 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setWebCalSyncHours()

ilCalendarSettings::setWebCalSyncHours ( int  $a_hours)

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

380 : void
381 {
382 $this->webcal_sync_hours = $a_hours;
383 }

Referenced by read().

+ Here is the caller graph for this function:

◆ useCache()

ilCalendarSettings::useCache ( bool  $a_status)

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

144 : void
145 {
146 $this->cache_enabled = $a_status;
147 }

Referenced by read().

+ Here is the caller graph for this function:

Field Documentation

◆ $batch_file_downloads

bool ilCalendarSettings::$batch_file_downloads = false
private

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

Referenced by isBatchFileDownloadsEnabled().

◆ $cache_enabled

bool ilCalendarSettings::$cache_enabled = true
private

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

Referenced by isCacheUsed().

◆ $cache_minutes

int ilCalendarSettings::$cache_minutes = 1
private

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

Referenced by getCacheMinutes().

◆ $cal_settings_id

int ilCalendarSettings::$cal_settings_id = 0
private

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

Referenced by getCalendarSettingsId().

◆ $cg_registration

bool ilCalendarSettings::$cg_registration = false
private

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

Referenced by isCGRegistrationEnabled().

◆ $consultation_hours

bool ilCalendarSettings::$consultation_hours = false
private

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

Referenced by areConsultationHoursEnabled().

◆ $course_cal_enabled

bool ilCalendarSettings::$course_cal_enabled = true
private

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

Referenced by isCourseCalendarEnabled().

◆ $course_cal_visible

bool ilCalendarSettings::$course_cal_visible = true
private

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

Referenced by isCourseCalendarVisible().

◆ $date_format

int ilCalendarSettings::$date_format = 0
private

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

Referenced by getDefaultDateFormat().

◆ $day_end

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

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

Referenced by getDefaultDayEnd().

◆ $day_start

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

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

Referenced by getDefaultDayStart().

◆ $db

ilDBInterface ilCalendarSettings::$db
protected

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

◆ $default_cal

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

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

Referenced by getDefaultCal(), and setDefaultCal().

◆ $default_period

int ilCalendarSettings::$default_period = 2
private

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

Referenced by getDefaultPeriod(), and setDefaultPeriod().

◆ $enabled

bool ilCalendarSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $group_cal_enabled

bool ilCalendarSettings::$group_cal_enabled = true
private

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

Referenced by isGroupCalendarEnabled().

◆ $group_cal_visible

bool ilCalendarSettings::$group_cal_visible = true
private

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

Referenced by isGroupCalendarVisible().

◆ $instance

ilCalendarSettings ilCalendarSettings::$instance = null
staticprivate

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

Referenced by _getInstance().

◆ $notification

bool ilCalendarSettings::$notification = false
private

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

Referenced by isNotificationEnabled().

◆ $notification_user

bool ilCalendarSettings::$notification_user = false
private

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

Referenced by isUserNotificationEnabled().

◆ $show_weeks

bool ilCalendarSettings::$show_weeks = false
private

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

Referenced by getShowWeeks().

◆ $storage

ilSetting ilCalendarSettings::$storage
protected

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

◆ $sync_cache_enabled

bool ilCalendarSettings::$sync_cache_enabled = true
private

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

Referenced by isSynchronisationCacheEnabled().

◆ $sync_cache_minutes

int ilCalendarSettings::$sync_cache_minutes = 10
private

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

Referenced by getSynchronisationCacheMinutes().

◆ $time_format

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

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

Referenced by getDefaultTimeFormat().

◆ $timezone

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

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

Referenced by getDefaultTimeZone().

◆ $webcal_sync

bool ilCalendarSettings::$webcal_sync = false
private

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

Referenced by isWebCalSyncEnabled().

◆ $webcal_sync_hours

int ilCalendarSettings::$webcal_sync_hours = 2
private

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

Referenced by getWebCalSyncHours().

◆ $week_start

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

Definition at line 58 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 33 of file class.ilCalendarSettings.php.

◆ DATE_FORMAT_YMD

◆ DEFAULT_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_CACHE_MINUTES = 0

Definition at line 46 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 31 of file class.ilCalendarSettings.php.

◆ DEFAULT_DAY_START

const ilCalendarSettings::DEFAULT_DAY_START = 8

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

◆ DEFAULT_SHOW_WEEKS

const ilCalendarSettings::DEFAULT_SHOW_WEEKS = true

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

◆ DEFAULT_SYNC_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_SYNC_CACHE_MINUTES = 10

Definition at line 47 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 28 of file class.ilCalendarSettings.php.

Referenced by ilCalendarSchedule\initPeriod().


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