ILIAS  release_8 Revision v8.24
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 ()
 
 setEnableGroupMilestones (bool $a_enablegroupmilestones)
 
 getEnableGroupMilestones ()
 
 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
 
bool $enablegroupmilestones = 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 90 of file class.ilCalendarSettings.php.

91 {
92 global $DIC;
93
94 $this->db = $DIC->database();
95 $this->initStorage();
96 $this->read();
98 }
global $DIC
Definition: feed.php:28

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

101 {
102 if (self::$instance) {
103 return self::$instance;
104 }
105 return self::$instance = new ilCalendarSettings();
106 }
Stores all calendar relevant settings.
static ilCalendarSettings $instance

References $instance.

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

+ Here is the caller graph for this function:

◆ areConsultationHoursEnabled()

ilCalendarSettings::areConsultationHoursEnabled ( )

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

261 : bool
262 {
264 }

References $consultation_hours.

Referenced by save().

+ Here is the caller graph for this function:

◆ enableBatchFileDownloads()

ilCalendarSettings::enableBatchFileDownloads ( bool  $a_stat)

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

417 : void
418 {
419 $this->batch_file_downloads = $a_stat;
420 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableCGRegistration()

ilCalendarSettings::enableCGRegistration ( bool  $a_status)

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

326 : void
327 {
328 $this->cg_registration = $a_status;
329 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableConsultationHours()

ilCalendarSettings::enableConsultationHours ( bool  $a_status)

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

266 : void
267 {
268 $this->consultation_hours = $a_status;
269 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableCourseCalendar()

ilCalendarSettings::enableCourseCalendar ( bool  $a_stat)

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

336 : void
337 {
338 $this->course_cal_enabled = $a_stat;
339 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableGroupCalendar()

ilCalendarSettings::enableGroupCalendar ( bool  $a_stat)

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

367 : void
368 {
369 $this->group_cal_enabled = $a_stat;
370 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableNotification()

ilCalendarSettings::enableNotification ( bool  $a_status)

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

311 : void
312 {
313 $this->notification = $a_status;
314 }

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

291 : void
292 {
293 $this->sync_cache_enabled = $a_status;
294 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableUserNotification()

ilCalendarSettings::enableUserNotification ( bool  $a_not)

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

321 : void
322 {
323 $this->notification_user = $a_not;
324 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableWebCalSync()

ilCalendarSettings::enableWebCalSync ( bool  $a_stat)

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

387 : void
388 {
389 $this->webcal_sync = $a_stat;
390 }

Referenced by read().

+ Here is the caller graph for this function:

◆ getCacheMinutes()

ilCalendarSettings::getCacheMinutes ( )

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

166 : int
167 {
169 }

References $cache_minutes.

Referenced by save().

+ Here is the caller graph for this function:

◆ getCalendarSettingsId()

ilCalendarSettings::getCalendarSettingsId ( )

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

271 : int
272 {
274 }

References $cal_settings_id.

◆ getDefaultCal()

ilCalendarSettings::getDefaultCal ( )

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

191 : int
192 {
193 return $this->default_cal;
194 }

References $default_cal.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultDateFormat()

ilCalendarSettings::getDefaultDateFormat ( )

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

226 : int
227 {
228 return $this->date_format;
229 }

References $date_format.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultDayEnd()

ilCalendarSettings::getDefaultDayEnd ( )

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

251 : int
252 {
253 return $this->day_end;
254 }

References $day_end.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultDayStart()

ilCalendarSettings::getDefaultDayStart ( )

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

241 : int
242 {
243 return $this->day_start;
244 }

References $day_start.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultPeriod()

ilCalendarSettings::getDefaultPeriod ( )

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

201 : int
202 {
204 }

References $default_period.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultTimeFormat()

ilCalendarSettings::getDefaultTimeFormat ( )

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

236 : int
237 {
238 return $this->time_format;
239 }

References $time_format.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultTimeZone()

ilCalendarSettings::getDefaultTimeZone ( )

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

216 : string
217 {
218 return $this->timezone;
219 }

References $timezone.

Referenced by save().

+ Here is the caller graph for this function:

◆ getDefaultWeekStart()

ilCalendarSettings::getDefaultWeekStart ( )

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

186 : int
187 {
188 return $this->week_start;
189 }

References $week_start.

Referenced by save().

+ Here is the caller graph for this function:

◆ getEnableGroupMilestones()

ilCalendarSettings::getEnableGroupMilestones ( )

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

281 : bool
282 {
284 }

References $enablegroupmilestones.

Referenced by save().

+ Here is the caller graph for this function:

◆ getShowWeeks()

ilCalendarSettings::getShowWeeks ( )

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

412 : bool
413 {
414 return $this->show_weeks;
415 }

References $show_weeks.

Referenced by save().

+ Here is the caller graph for this function:

◆ getSynchronisationCacheMinutes()

ilCalendarSettings::getSynchronisationCacheMinutes ( )

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

301 : int
302 {
304 }

References $sync_cache_minutes.

Referenced by save().

+ Here is the caller graph for this function:

◆ getWebCalSyncHours()

ilCalendarSettings::getWebCalSyncHours ( )

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

402 : int
403 {
405 }

References $webcal_sync_hours.

Referenced by save().

+ Here is the caller graph for this function:

◆ initStorage()

ilCalendarSettings::initStorage ( )
private

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

527 {
528 $this->storage = new ilSetting('calendar');
529 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by __construct().

+ Here is the caller graph for this function:

◆ isBatchFileDownloadsEnabled()

ilCalendarSettings::isBatchFileDownloadsEnabled ( )

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

422 : bool
423 {
425 }

References $batch_file_downloads.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCacheUsed()

ilCalendarSettings::isCacheUsed ( )

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

156 : bool
157 {
159 }

References $cache_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCGRegistrationEnabled()

ilCalendarSettings::isCGRegistrationEnabled ( )

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

331 : bool
332 {
334 }

References $cg_registration.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCourseCalendarEnabled()

ilCalendarSettings::isCourseCalendarEnabled ( )

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

341 : bool
342 {
344 }

References $course_cal_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCourseCalendarVisible()

ilCalendarSettings::isCourseCalendarVisible ( )

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

346 : bool
347 {
349 }

References $course_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

+ Here is the caller graph for this function:

◆ isEnabled()

ilCalendarSettings::isEnabled ( )

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

176 : bool
177 {
178 return $this->enabled;
179 }

References $enabled.

Referenced by lookupCalendarActivated(), and save().

+ Here is the caller graph for this function:

◆ isGroupCalendarEnabled()

ilCalendarSettings::isGroupCalendarEnabled ( )

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

372 : bool
373 {
375 }

References $group_cal_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isGroupCalendarVisible()

ilCalendarSettings::isGroupCalendarVisible ( )

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

377 : bool
378 {
380 }

References $group_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

+ Here is the caller graph for this function:

◆ isNotificationEnabled()

ilCalendarSettings::isNotificationEnabled ( )

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

306 : bool
307 {
308 return $this->notification;
309 }

References $notification.

Referenced by save().

+ Here is the caller graph for this function:

◆ isObjectCalendarVisible()

ilCalendarSettings::isObjectCalendarVisible ( string  $type)

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

356 : bool
357 {
358 switch ($type) {
359 case 'crs':
360 return $this->isCourseCalendarVisible();
361 case 'grp':
362 return $this->isGroupCalendarVisible();
363 }
364 return false;
365 }
$type

References $type, isCourseCalendarVisible(), and isGroupCalendarVisible().

+ Here is the call graph for this function:

◆ isSynchronisationCacheEnabled()

ilCalendarSettings::isSynchronisationCacheEnabled ( )

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

286 : bool
287 {
289 }

References $sync_cache_enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isUserNotificationEnabled()

ilCalendarSettings::isUserNotificationEnabled ( )

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

316 : bool
317 {
319 }

References $notification_user.

Referenced by save().

+ Here is the caller graph for this function:

◆ isWebCalSyncEnabled()

ilCalendarSettings::isWebCalSyncEnabled ( )

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

392 : bool
393 {
394 return $this->webcal_sync;
395 }

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

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

References $type, _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 108 of file class.ilCalendarSettings.php.

108 : bool
109 {
110 if (!self::lookupCalendarActivated($obj_id)) {
111 return false;
112 }
114 $type = ilObject::_lookupType($obj_id);
115 $default = $settings->isObjectCalendarVisible($type);
117 $obj_id,
118 'cont_show_calendar',
119 (string) $default
120 );
121 }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200

References ILIAS\LTI\ToolProvider\$settings, $type, _getInstance(), ilContainer\_lookupContainerSetting(), and ilObject\_lookupType().

+ Here is the call graph for this function:

◆ read()

ilCalendarSettings::read ( )
private

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

458 {
459 $this->setEnabled((bool) $this->storage->get('enabled'));
460 $this->setDefaultTimeZone($this->storage->get('default_timezone', ilTimeZone::_getDefaultTimeZone()));
461 $this->setDefaultWeekStart((int) $this->storage->get('default_week_start', (string) self::WEEK_START_MONDAY));
462 $this->setDefaultDateFormat((int) $this->storage->get('default_date_format', (string) self::DATE_FORMAT_DMY));
463 $this->setDefaultTimeFormat((int) $this->storage->get('default_time_format', (string) self::TIME_FORMAT_24));
464 $this->setEnableGroupMilestones((bool) $this->storage->get('enable_grp_milestones'));
465 $this->setDefaultDayStart((int) $this->storage->get('default_day_start', (string) self::DEFAULT_DAY_START));
466 $this->setDefaultDayEnd((int) $this->storage->get('default_day_end', (string) self::DEFAULT_DAY_END));
467 $this->useCache((bool) $this->storage->get('cache_enabled', (string) $this->cache_enabled));
468 $this->setCacheMinutes((int) $this->storage->get('cache_minutes', (string) self::DEFAULT_CACHE_MINUTES));
469 $this->enableSynchronisationCache((bool) $this->storage->get(
470 'sync_cache_enabled',
471 (string) $this->isSynchronisationCacheEnabled()
472 ));
473 $this->setSynchronisationCacheMinutes((int) $this->storage->get(
474 'sync_cache_minutes',
475 (string) self::DEFAULT_SYNC_CACHE_MINUTES
476 ));
477 $this->enableNotification((bool) $this->storage->get('notification', (string) $this->isNotificationEnabled()));
478 $this->enableConsultationHours((bool) $this->storage->get(
479 'consultation_hours',
480 (string) $this->areConsultationHoursEnabled()
481 ));
482 $this->enableCGRegistration((bool) $this->storage->get(
483 'cg_registration',
484 (string) $this->isCGRegistrationEnabled()
485 ));
486 $this->enableCourseCalendar((bool) $this->storage->get(
487 'course_cal',
488 (string) $this->isCourseCalendarEnabled()
489 ));
490 $this->setCourseCalendarVisible((bool) $this->storage->get(
491 'course_cal_visible',
492 (string) $this->isCourseCalendarVisible()
493 ));
494 $this->enableGroupCalendar((bool) $this->storage->get('group_cal', (string) $this->isGroupCalendarEnabled()));
495 $this->setGroupCalendarVisible((bool) $this->storage->get(
496 'group_cal_visible',
497 (string) $this->isGroupCalendarVisible()
498 ));
499 $this->enableUserNotification((bool) $this->storage->get(
500 'notification_user',
501 (string) $this->isUserNotificationEnabled()
502 ));
503 $this->enableWebCalSync((bool) $this->storage->get('webcal_sync', (string) $this->isWebCalSyncEnabled()));
504 $this->setWebCalSyncHours((int) $this->storage->get('webcal_sync_hours', (string) $this->getWebCalSyncHours()));
505 $this->setShowWeeks((bool) $this->storage->get('show_weeks', (string) $this->getShowWeeks()));
506 $this->enableBatchFileDownloads((bool) $this->storage->get(
507 'batch_files',
508 (string) $this->isBatchFileDownloadsEnabled()
509 ));
510 $this->setDefaultCal((int) $this->storage->get('default_calendar_view', (string) $this->getDefaultCal()));
511 $this->setDefaultPeriod((int) $this->storage->get('default_period', (string) $this->getDefaultPeriod()));
512 }
setEnableGroupMilestones(bool $a_enablegroupmilestones)
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(), setEnableGroupMilestones(), 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 514 of file class.ilCalendarSettings.php.

514 : void
515 {
516 $query = "SELECT ref_id FROM object_reference obr " .
517 "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
518 "WHERE type = 'cals'";
519
520 $set = $this->db->query($query);
521 $row = $this->db->fetchAssoc($set);
522
523 $this->cal_settings_id = (int) $row["ref_id"];
524 }
$query

References $query, and 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 427 of file class.ilCalendarSettings.php.

428 {
429 $this->storage->set('enabled', (string) (int) $this->isEnabled());
430 $this->storage->set('default_timezone', $this->getDefaultTimeZone());
431 $this->storage->set('default_week_start', (string) $this->getDefaultWeekStart());
432 $this->storage->set('default_date_format', (string) $this->getDefaultDateFormat());
433 $this->storage->set('default_time_format', (string) $this->getDefaultTimeFormat());
434 $this->storage->set('enable_grp_milestones', (string) (int) $this->getEnableGroupMilestones());
435 $this->storage->set('default_day_start', (string) $this->getDefaultDayStart());
436 $this->storage->set('default_day_end', (string) $this->getDefaultDayEnd());
437 $this->storage->set('cache_minutes', (string) $this->getCacheMinutes());
438 $this->storage->set('sync_cache_enabled', (string) (int) $this->isSynchronisationCacheEnabled());
439 $this->storage->set('sync_cache_minutes', (string) $this->getSynchronisationCacheMinutes());
440 $this->storage->set('cache_enabled', (string) (int) $this->isCacheUsed());
441 $this->storage->set('notification', (string) (int) $this->isNotificationEnabled());
442 $this->storage->set('consultation_hours', (string) (int) $this->areConsultationHoursEnabled());
443 $this->storage->set('cg_registration', (string) (int) $this->isCGRegistrationEnabled());
444 $this->storage->set('course_cal', (string) (int) $this->isCourseCalendarEnabled());
445 $this->storage->set('course_cal_visible', (string) (int) $this->isCourseCalendarVisible());
446 $this->storage->set('group_cal', (string) (int) $this->isGroupCalendarEnabled());
447 $this->storage->set('group_cal_visible', (string) (int) $this->isGroupCalendarVisible());
448 $this->storage->set('notification_user', (string) (int) $this->isUserNotificationEnabled());
449 $this->storage->set('webcal_sync', (string) (int) $this->isWebCalSyncEnabled());
450 $this->storage->set('webcal_sync_hours', (string) $this->getWebCalSyncHours());
451 $this->storage->set('show_weeks', (string) (int) $this->getShowWeeks());
452 $this->storage->set('batch_files', (string) (int) $this->isBatchFileDownloadsEnabled());
453 $this->storage->set('default_calendar_view', (string) $this->getDefaultCal());
454 $this->storage->set('default_period', (string) $this->getDefaultPeriod());
455 }

References areConsultationHoursEnabled(), getCacheMinutes(), getDefaultCal(), getDefaultDateFormat(), getDefaultDayEnd(), getDefaultDayStart(), getDefaultPeriod(), getDefaultTimeFormat(), getDefaultTimeZone(), getDefaultWeekStart(), getEnableGroupMilestones(), 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 161 of file class.ilCalendarSettings.php.

161 : void
162 {
163 $this->cache_minutes = $a_min;
164 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setCourseCalendarVisible()

ilCalendarSettings::setCourseCalendarVisible ( bool  $status)

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

351 : void
352 {
353 $this->course_cal_visible = $status;
354 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultCal()

ilCalendarSettings::setDefaultCal ( int  $default_cal)

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

196 : void
197 {
198 $this->default_cal = $default_cal;
199 }

References $default_cal.

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultDateFormat()

ilCalendarSettings::setDefaultDateFormat ( int  $a_format)

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

221 : void
222 {
223 $this->date_format = $a_format;
224 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultDayEnd()

ilCalendarSettings::setDefaultDayEnd ( int  $a_end)

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

256 : void
257 {
258 $this->day_end = $a_end;
259 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultDayStart()

ilCalendarSettings::setDefaultDayStart ( int  $a_start)

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

246 : void
247 {
248 $this->day_start = $a_start;
249 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultPeriod()

ilCalendarSettings::setDefaultPeriod ( int  $default_period)

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

206 : void
207 {
208 $this->default_period = $default_period;
209 }

References $default_period.

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultTimeFormat()

ilCalendarSettings::setDefaultTimeFormat ( int  $a_format)

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

231 : void
232 {
233 $this->time_format = $a_format;
234 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultTimeZone()

ilCalendarSettings::setDefaultTimeZone ( string  $a_zone)

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

211 : void
212 {
213 $this->timezone = $a_zone;
214 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultWeekStart()

ilCalendarSettings::setDefaultWeekStart ( int  $a_start)

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

181 : void
182 {
183 $this->week_start = $a_start;
184 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setEnabled()

ilCalendarSettings::setEnabled ( bool  $a_enabled)

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

171 : void
172 {
173 $this->enabled = $a_enabled;
174 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setEnableGroupMilestones()

ilCalendarSettings::setEnableGroupMilestones ( bool  $a_enablegroupmilestones)

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

276 : void
277 {
278 $this->enablegroupmilestones = $a_enablegroupmilestones;
279 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupCalendarVisible()

ilCalendarSettings::setGroupCalendarVisible ( bool  $status)

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

382 : void
383 {
384 $this->group_cal_visible = $status;
385 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setShowWeeks()

ilCalendarSettings::setShowWeeks ( bool  $a_val)

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

407 : void
408 {
409 $this->show_weeks = $a_val;
410 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSynchronisationCacheMinutes()

ilCalendarSettings::setSynchronisationCacheMinutes ( int  $a_min)

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

296 : void
297 {
298 $this->sync_cache_minutes = $a_min;
299 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setWebCalSyncHours()

ilCalendarSettings::setWebCalSyncHours ( int  $a_hours)

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

397 : void
398 {
399 $this->webcal_sync_hours = $a_hours;
400 }

Referenced by read().

+ Here is the caller graph for this function:

◆ useCache()

ilCalendarSettings::useCache ( bool  $a_status)

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

151 : void
152 {
153 $this->cache_enabled = $a_status;
154 }

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

◆ $enablegroupmilestones

bool ilCalendarSettings::$enablegroupmilestones = false
private

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

Referenced by getEnableGroupMilestones().

◆ $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.

Referenced by _getInstance().

◆ $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: