ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilCalendarSettings Class Reference

Stores all calendar relevant settings. More...

+ Collaboration diagram for ilCalendarSettings:

Public Member Functions

 useCache ($a_status)
 Enable cache. More...
 
 isCacheUsed ()
 Check if cache is used. More...
 
 setCacheMinutes ($a_min)
 Set time of cache storage. More...
 
 getCacheMinutes ()
 Get cache minutes. More...
 
 setEnabled ($a_enabled)
 set enabled More...
 
 isEnabled ()
 is calendar enabled More...
 
 setDefaultWeekStart ($a_start)
 set week start More...
 
 getDefaultWeekStart ()
 get default week start More...
 
 setDefaultTimeZone ($a_zone)
 set default timezone More...
 
 getDefaultTimeZone ()
 get derfault time zone More...
 
 setDefaultDateFormat ($a_format)
 set default date format More...
 
 getDefaultDateFormat ()
 get default date format More...
 
 setDefaultTimeFormat ($a_format)
 set default time format More...
 
 getDefaultTimeFormat ()
 get default time format More...
 
 getDefaultDayStart ()
 Get default end of day. More...
 
 setDefaultDayStart ($a_start)
 Set default start of day. More...
 
 getDefaultDayEnd ()
 Get default end of day. More...
 
 setDefaultDayEnd ($a_end)
 set default end of day More...
 
 areConsultationHoursEnabled ()
 Check if consultation hours are enabled. More...
 
 enableConsultationHours ($a_status)
 En/Disable consultation hours. More...
 
 getCalendarSettingsId ()
 Get calendar settings id (Used for permission checks) More...
 
 setEnableGroupMilestones ($a_enablegroupmilestones)
 Set Enable milestone planning feature for groups. More...
 
 getEnableGroupMilestones ()
 Get Enable milestone planning feature for groups. More...
 
 isSynchronisationCacheEnabled ()
 Check if cache is active for calendar synchronisation. More...
 
 enableSynchronisationCache ($a_status)
 En/Disable synchronisation cache. More...
 
 setSynchronisationCacheMinutes ($a_min)
 Set synchronisation cache minutes. More...
 
 getSynchronisationCacheMinutes ()
 get synchronisation cache minutes More...
 
 isNotificationEnabled ()
 Course group notification enabled. More...
 
 enableNotification ($a_status)
 Enable course group notification. More...
 
 isUserNotificationEnabled ()
 
 enableUserNotification ($a_not)
 
 enableCGRegistration ($a_status)
 Enable optional registration for courses and groups. More...
 
 isCGRegistrationEnabled ()
 
 enableCourseCalendar ($a_stat)
 
 isCourseCalendarEnabled ()
 
 enableGroupCalendar ($a_stat)
 
 isGroupCalendarEnabled ()
 
 enableWebCalSync ($a_stat)
 
 isWebCalSyncEnabled ()
 
 setWebCalSyncHours ($a_hours)
 
 getWebCalSyncHours ()
 
 save ()
 save More...
 

Static Public Member Functions

static _getInstance ()
 get singleton instance More...
 
static lookupCalendarActivated ($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_DMY = 1
 
const DATE_FORMAT_YMD = 2
 
const DATE_FORMAT_MDY = 3
 
const TIME_FORMAT_24 = 1
 
const TIME_FORMAT_12 = 2
 
const DEFAULT_CACHE_MINUTES = 0
 
const DEFAULT_SYNC_CACHE_MINUTES = 10
 

Private Member Functions

 __construct ()
 singleton contructor More...
 
 read ()
 Read settings. More...
 
 readCalendarSettingsId ()
 Read ref_id of calendar settings. More...
 
 initStorage ()
 Init storage class (ilSetting) private. More...
 

Private Attributes

 $db = null
 
 $storage = null
 
 $timezone = null
 
 $time_format = null
 
 $week_start = 0
 
 $day_start = null
 
 $day_end = null
 
 $enabled = false
 
 $cal_settings_id = 0
 
 $consultation_hours = false
 
 $cache_enabled = true
 
 $cache_minutes = 1
 
 $sync_cache_enabled = true
 
 $sync_cache_minutes = 10
 
 $notification = false
 
 $notification_user = false
 
 $cg_registration = false
 
 $course_cal_enabled = true
 
 $group_cal_enabled = true
 
 $webcal_sync = false
 
 $webcal_sync_hours = 2
 

Static Private Attributes

static $instance = null
 

Detailed Description

Stores all calendar relevant settings.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilCalendarSettings::__construct ( )
private

singleton contructor

private

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

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

92  {
93  global $ilDB;
94 
95  $this->db = $ilDB;
96 
97  $this->initStorage();
98  $this->read();
99  $this->readCalendarSettingsId();
100  }
global $ilDB
readCalendarSettingsId()
Read ref_id of calendar settings.
initStorage()
Init storage class (ilSetting) private.
+ Here is the call graph for this function:

Member Function Documentation

◆ _getInstance()

static ilCalendarSettings::_getInstance ( )
static

get singleton instance

public

Returns
ilCalendarSettings
ilCalendarSettings

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

Referenced by ilCalendarCache\__construct(), ilCalendarUserSettings\__construct(), ilCalendarUserSettingsGUI\__construct(), ilCalendarAppointmentPanelGUI\__construct(), ilObjPersonalDesktopSettingsGUI\editSettings(), ilCalendarPresentationGUI\executeCommand(), ilObjUser\getDateFormat(), ilUserUtil\getPossibleStartingPoints(), ilObjUser\getTimeFormat(), ilObjUser\getTimeZone(), ilPortfolioPageConfig\init(), ilObjCalendarSettingsGUI\initCalendarSettings(), ilCalendarAppointmentGUI\initForm(), ilCalendarCategoryGUI\initFormCategory(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilColumnGUI\isGloballyActivated(), ilCalendarAuthenticationToken\isIcalExpired(), lookupCalendarActivated(), ilCalendarPresentationGUI\prepareOutput(), ilCalendarCache\readEntry(), ilCalendarCategoryGUI\readPermissions(), ilCalendarCategories\readPublicCalendars(), ilCalendarCategories\readReposCalendars(), ilCalendarCategories\readSelectedCategories(), ilMainMenuGUI\renderDropDown(), ilMainMenuGUI\renderEntry(), ilCalendarAppointmentGUI\save(), ilObjPersonalDesktopSettingsGUI\saveSettings(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), ilCalendarMonthGUI\show(), ilCalendarCache\storeEntry(), ilCalendarCache\storeUnlimitedEntry(), ilCalendarPresentationGUI\synchroniseExternalCalendars(), ilCalendarAppointmentGUI\update(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilObjectServiceSettingsGUI\updateToolSettings().

111  {
112  if(self::$instance)
113  {
114  return self::$instance;
115  }
116  return self::$instance = new ilCalendarSettings();
117  }
Stores all calendar relevant settings.
+ Here is the caller graph for this function:

◆ areConsultationHoursEnabled()

ilCalendarSettings::areConsultationHoursEnabled ( )

Check if consultation hours are enabled.

Returns

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

References $consultation_hours.

Referenced by save().

345  {
347  }
+ Here is the caller graph for this function:

◆ enableCGRegistration()

ilCalendarSettings::enableCGRegistration (   $a_status)

Enable optional registration for courses and groups.

Parameters
bool$a_status
Returns

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

Referenced by read().

463  {
464  $this->cg_registration = $a_status;
465  }
+ Here is the caller graph for this function:

◆ enableConsultationHours()

ilCalendarSettings::enableConsultationHours (   $a_status)

En/Disable consultation hours.

Returns

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

Referenced by read().

354  {
355  $this->consultation_hours = $a_status;
356  }
+ Here is the caller graph for this function:

◆ enableCourseCalendar()

ilCalendarSettings::enableCourseCalendar (   $a_stat)

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

Referenced by read().

473  {
474  $this->course_cal_enabled = $a_stat;
475  }
+ Here is the caller graph for this function:

◆ enableGroupCalendar()

ilCalendarSettings::enableGroupCalendar (   $a_stat)

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

Referenced by read().

483  {
484  $this->group_cal_enabled = $a_stat;
485  }
+ Here is the caller graph for this function:

◆ enableNotification()

ilCalendarSettings::enableNotification (   $a_status)

Enable course group notification.

Parameters
bool$a_status
Returns

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

References notification().

Referenced by read().

443  {
444  $this->notification = $a_status;
445  }
notification()
Definition: notification.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableSynchronisationCache()

ilCalendarSettings::enableSynchronisationCache (   $a_status)

En/Disable synchronisation cache.

Returns

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

Referenced by read().

405  {
406  $this->sync_cache_enabled = $a_status;
407  }
+ Here is the caller graph for this function:

◆ enableUserNotification()

ilCalendarSettings::enableUserNotification (   $a_not)

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

Referenced by read().

453  {
454  $this->notification_user = $a_not;
455  }
+ Here is the caller graph for this function:

◆ enableWebCalSync()

ilCalendarSettings::enableWebCalSync (   $a_stat)

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

Referenced by read().

493  {
494  $this->webcal_sync = $a_stat;
495  }
+ Here is the caller graph for this function:

◆ getCacheMinutes()

ilCalendarSettings::getCacheMinutes ( )

Get cache minutes.

Returns

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

References $cache_minutes.

Referenced by save().

188  {
189  return (int) $this->cache_minutes;
190  }
+ Here is the caller graph for this function:

◆ getCalendarSettingsId()

ilCalendarSettings::getCalendarSettingsId ( )

Get calendar settings id (Used for permission checks)

public

Returns

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

References $cal_settings_id.

367  {
368  return $this->cal_settings_id;
369  }

◆ getDefaultDateFormat()

ilCalendarSettings::getDefaultDateFormat ( )

get default date format

public

Returns
int date format

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

Referenced by save().

275  {
276  return $this->date_format;
277  }
+ Here is the caller graph for this function:

◆ getDefaultDayEnd()

ilCalendarSettings::getDefaultDayEnd ( )

Get default end of day.

Returns

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

References $day_end.

Referenced by save().

326  {
327  return $this->day_end;
328  }
+ Here is the caller graph for this function:

◆ getDefaultDayStart()

ilCalendarSettings::getDefaultDayStart ( )

Get default end of day.

Returns

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

References $day_start.

Referenced by save().

307  {
308  return $this->day_start;
309  }
+ Here is the caller graph for this function:

◆ getDefaultTimeFormat()

ilCalendarSettings::getDefaultTimeFormat ( )

get default time format

public

Returns
int time format

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

References $time_format.

Referenced by save().

298  {
299  return $this->time_format;
300  }
+ Here is the caller graph for this function:

◆ getDefaultTimeZone()

ilCalendarSettings::getDefaultTimeZone ( )

get derfault time zone

public

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

References $timezone.

Referenced by save().

252  {
253  return $this->timezone;
254  }
+ Here is the caller graph for this function:

◆ getDefaultWeekStart()

ilCalendarSettings::getDefaultWeekStart ( )

get default week start

public

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

References $week_start.

Referenced by save().

232  {
233  return $this->week_start;
234  }
+ Here is the caller graph for this function:

◆ getEnableGroupMilestones()

ilCalendarSettings::getEnableGroupMilestones ( )

Get Enable milestone planning feature for groups.

Returns
boolean Enable milestone planning feature for groups

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

Referenced by save().

387  {
388  return $this->enablegroupmilestones;
389  }
+ Here is the caller graph for this function:

◆ getSynchronisationCacheMinutes()

ilCalendarSettings::getSynchronisationCacheMinutes ( )

get synchronisation cache minutes

Returns

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

References $sync_cache_minutes.

Referenced by save().

424  {
426  }
+ Here is the caller graph for this function:

◆ getWebCalSyncHours()

ilCalendarSettings::getWebCalSyncHours ( )

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

References $webcal_sync_hours.

Referenced by save().

508  {
510  }
+ Here is the caller graph for this function:

◆ initStorage()

ilCalendarSettings::initStorage ( )
private

Init storage class (ilSetting) private.

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

Referenced by __construct().

598  {
599  include_once('./Services/Administration/classes/class.ilSetting.php');
600  $this->storage = new ilSetting('calendar');
601  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ isCacheUsed()

ilCalendarSettings::isCacheUsed ( )

Check if cache is used.

Returns

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

References $cache_enabled.

Referenced by save().

169  {
170  return $this->cache_enabled;
171  }
+ Here is the caller graph for this function:

◆ isCGRegistrationEnabled()

ilCalendarSettings::isCGRegistrationEnabled ( )

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

References $cg_registration.

Referenced by save().

468  {
469  return $this->cg_registration;
470  }
+ Here is the caller graph for this function:

◆ isCourseCalendarEnabled()

ilCalendarSettings::isCourseCalendarEnabled ( )

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

References $course_cal_enabled.

Referenced by save().

478  {
480  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilCalendarSettings::isEnabled ( )

is calendar enabled

public

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

References $enabled.

Referenced by lookupCalendarActivated(), and save().

210  {
211  return (bool) $this->enabled;
212  }
+ Here is the caller graph for this function:

◆ isGroupCalendarEnabled()

ilCalendarSettings::isGroupCalendarEnabled ( )

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

References $group_cal_enabled.

Referenced by save().

488  {
490  }
+ Here is the caller graph for this function:

◆ isNotificationEnabled()

ilCalendarSettings::isNotificationEnabled ( )

Course group notification enabled.

Returns

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

References $notification.

Referenced by save().

433  {
434  return (bool) $this->notification;
435  }
+ Here is the caller graph for this function:

◆ isSynchronisationCacheEnabled()

ilCalendarSettings::isSynchronisationCacheEnabled ( )

Check if cache is active for calendar synchronisation.

Returns

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

References $sync_cache_enabled.

Referenced by read(), and save().

396  {
397  return (bool) $this->sync_cache_enabled;
398  }
+ Here is the caller graph for this function:

◆ isUserNotificationEnabled()

ilCalendarSettings::isUserNotificationEnabled ( )

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

References $notification_user.

Referenced by save().

448  {
450  }
+ Here is the caller graph for this function:

◆ isWebCalSyncEnabled()

ilCalendarSettings::isWebCalSyncEnabled ( )

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

References $webcal_sync.

Referenced by save().

498  {
499  return $this->webcal_sync;
500  }
+ Here is the caller graph for this function:

◆ lookupCalendarActivated()

static ilCalendarSettings::lookupCalendarActivated (   $a_obj_id)
static
Parameters
type$a_obj_id

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

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

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

124  {
126  {
127  return false;
128  }
129  $type = ilObject::_lookupType($a_obj_id);
130  // lookup global setting
131  $gl_activated = false;
132  switch($type)
133  {
134  case 'crs':
135  $gl_activated = ilCalendarSettings::_getInstance()->isCourseCalendarEnabled();
136  break;
137 
138  case 'grp':
139  $gl_activated = ilCalendarSettings::_getInstance()->isGroupCalendarEnabled();
140  break;
141 
142  default:
143  return false;
144  }
145  // look individual object setting
146  include_once './Services/Container/classes/class.ilContainer.php';
148  $a_obj_id,
149  'cont_show_calendar',
150  $gl_activated
151  );
152  }
static _getInstance()
get singleton instance
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
isEnabled()
is calendar enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilCalendarSettings::read ( )
private

Read settings.

private

Parameters

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

References $cache_enabled, ilTimeZone\_getDefaultTimeZone(), enableCGRegistration(), enableConsultationHours(), enableCourseCalendar(), enableGroupCalendar(), enableNotification(), enableSynchronisationCache(), enableUserNotification(), enableWebCalSync(), isSynchronisationCacheEnabled(), setCacheMinutes(), setDefaultDateFormat(), setDefaultDayEnd(), setDefaultDayStart(), setDefaultTimeFormat(), setDefaultTimeZone(), setDefaultWeekStart(), setEnabled(), setEnableGroupMilestones(), setSynchronisationCacheMinutes(), setWebCalSyncHours(), and useCache().

Referenced by __construct().

549  {
550  $this->setEnabled($this->storage->get('enabled'));
551  $this->setDefaultTimeZone($this->storage->get('default_timezone',ilTimeZone::_getDefaultTimeZone()));
552  $this->setDefaultWeekStart($this->storage->get('default_week_start',self::WEEK_START_MONDAY));
553  $this->setDefaultDateFormat($this->storage->get('default_date_format',self::DATE_FORMAT_DMY));
554  $this->setDefaultTimeFormat($this->storage->get('default_time_format',self::TIME_FORMAT_24));
555  $this->setEnableGroupMilestones($this->storage->get('enable_grp_milestones'));
556  $this->setDefaultDayStart($this->storage->get('default_day_start',self::DEFAULT_DAY_START));
557  $this->setDefaultDayEnd($this->storage->get('default_day_end',self::DEFAULT_DAY_END));
558  $this->useCache($this->storage->get('cache_enabled'),$this->cache_enabled);
559  $this->setCacheMinutes($this->storage->get('cache_minutes',self::DEFAULT_CACHE_MINUTES));
560  $this->enableSynchronisationCache($this->storage->get('sync_cache_enabled'),$this->isSynchronisationCacheEnabled());
561  $this->setSynchronisationCacheMinutes($this->storage->get('sync_cache_minutes',self::DEFAULT_SYNC_CACHE_MINUTES));
562  $this->enableNotification($this->storage->get('notification',$this->isNotificationEnabled()));
563  $this->enableConsultationHours($this->storage->get('consultation_hours',$this->areConsultationHoursEnabled()));
564  $this->enableCGRegistration($this->storage->get('cg_registration',$this->isCGRegistrationEnabled()));
565  $this->enableCourseCalendar($this->storage->get('course_cal',$this->isCourseCalendarEnabled()));
566  $this->enableGroupCalendar($this->storage->get('group_cal',$this->isGroupCalendarEnabled()));
567  $this->enableUserNotification($this->storage->get('notification_user',$this->isUserNotificationEnabled()));
568  $this->enableWebCalSync($this->storage->get('webcal_sync',$this->isWebCalSyncEnabled()));
569  $this->setWebCalSyncHours($this->storage->get('webcal_sync_hours',$this->getWebCalSyncHours()));
570  }
static _getDefaultTimeZone()
Calculate and set default time zone.
setSynchronisationCacheMinutes($a_min)
Set synchronisation cache minutes.
enableConsultationHours($a_status)
En/Disable consultation hours.
setDefaultDayStart($a_start)
Set default start of day.
setDefaultDateFormat($a_format)
set default date format
setEnableGroupMilestones($a_enablegroupmilestones)
Set Enable milestone planning feature for groups.
setDefaultDayEnd($a_end)
set default end of day
setDefaultTimeFormat($a_format)
set default time format
setCacheMinutes($a_min)
Set time of cache storage.
setDefaultTimeZone($a_zone)
set default timezone
setEnabled($a_enabled)
set enabled
enableSynchronisationCache($a_status)
En/Disable synchronisation cache.
enableNotification($a_status)
Enable course group notification.
useCache($a_status)
Enable cache.
enableCGRegistration($a_status)
Enable optional registration for courses and groups.
isSynchronisationCacheEnabled()
Check if cache is active for calendar synchronisation.
setDefaultWeekStart($a_start)
set week start
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCalendarSettingsId()

ilCalendarSettings::readCalendarSettingsId ( )
private

Read ref_id of calendar settings.

private

Parameters

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

References $query, and $row.

Referenced by __construct().

580  {
581  $query = "SELECT ref_id FROM object_reference obr ".
582  "JOIN object_data obd ON obd.obj_id = obr.obj_id ".
583  "WHERE type = 'cals'";
584 
585  $set = $this->db->query($query);
586  $row = $this->db->fetchAssoc($set);
587 
588  $this->cal_settings_id = $row["ref_id"];
589  return true;
590  }
+ Here is the caller graph for this function:

◆ save()

ilCalendarSettings::save ( )

save

public

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

References areConsultationHoursEnabled(), getCacheMinutes(), getDefaultDateFormat(), getDefaultDayEnd(), getDefaultDayStart(), getDefaultTimeFormat(), getDefaultTimeZone(), getDefaultWeekStart(), getEnableGroupMilestones(), getSynchronisationCacheMinutes(), getWebCalSyncHours(), isCacheUsed(), isCGRegistrationEnabled(), isCourseCalendarEnabled(), isEnabled(), isGroupCalendarEnabled(), isNotificationEnabled(), isSynchronisationCacheEnabled(), isUserNotificationEnabled(), and isWebCalSyncEnabled().

518  {
519  $this->storage->set('enabled',(int) $this->isEnabled());
520  $this->storage->set('default_timezone',$this->getDefaultTimeZone());
521  $this->storage->set('default_week_start',$this->getDefaultWeekStart());
522  $this->storage->set('default_date_format',$this->getDefaultDateFormat());
523  $this->storage->set('default_time_format',$this->getDefaultTimeFormat());
524  $this->storage->set('enable_grp_milestones',(int) $this->getEnableGroupMilestones());
525  $this->storage->set('default_day_start',(int) $this->getDefaultDayStart());
526  $this->storage->set('default_day_end',(int) $this->getDefaultDayEnd());
527  $this->storage->set('cache_minutes',(int) $this->getCacheMinutes());
528  $this->storage->set('sync_cache_enabled',(int) $this->isSynchronisationCacheEnabled());
529  $this->storage->set('sync_cache_minutes',(int) $this->getSynchronisationCacheMinutes());
530  $this->storage->set('cache_enabled',(int) $this->isCacheUsed());
531  $this->storage->set('notification',(int) $this->isNotificationEnabled());
532  $this->storage->set('consultation_hours',(int) $this->areConsultationHoursEnabled());
533  $this->storage->set('cg_registration',(int) $this->isCGRegistrationEnabled());
534  $this->storage->set('course_cal',(int) $this->isCourseCalendarEnabled());
535  $this->storage->set('group_cal',(int) $this->isGroupCalendarEnabled());
536  $this->storage->set('notification_user',(int) $this->isUserNotificationEnabled());
537  $this->storage->set('webcal_sync',(int) $this->isWebCalSyncEnabled());
538  $this->storage->set('webcal_sync_hours',(int) $this->getWebCalSyncHours());
539  }
getDefaultTimeFormat()
get default time format
getCacheMinutes()
Get cache minutes.
getDefaultTimeZone()
get derfault time zone
getDefaultWeekStart()
get default week start
isNotificationEnabled()
Course group notification enabled.
isCacheUsed()
Check if cache is used.
getDefaultDateFormat()
get default date format
getDefaultDayStart()
Get default end of day.
getSynchronisationCacheMinutes()
get synchronisation cache minutes
getDefaultDayEnd()
Get default end of day.
areConsultationHoursEnabled()
Check if consultation hours are enabled.
isEnabled()
is calendar enabled
getEnableGroupMilestones()
Get Enable milestone planning feature for groups.
isSynchronisationCacheEnabled()
Check if cache is active for calendar synchronisation.
+ Here is the call graph for this function:

◆ setCacheMinutes()

ilCalendarSettings::setCacheMinutes (   $a_min)

Set time of cache storage.

Parameters
int$a_min
Returns

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

Referenced by read().

179  {
180  $this->cache_minutes = $a_min;
181  }
+ Here is the caller graph for this function:

◆ setDefaultDateFormat()

ilCalendarSettings::setDefaultDateFormat (   $a_format)

set default date format

public

Parameters
intdate format
Returns

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

Referenced by read().

264  {
265  $this->date_format = $a_format;
266  }
+ Here is the caller graph for this function:

◆ setDefaultDayEnd()

ilCalendarSettings::setDefaultDayEnd (   $a_end)

set default end of day

Returns
Parameters
object$a_end

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

Referenced by read().

336  {
337  $this->day_end = $a_end;
338  }
+ Here is the caller graph for this function:

◆ setDefaultDayStart()

ilCalendarSettings::setDefaultDayStart (   $a_start)

Set default start of day.

Returns
Parameters
object$a_start

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

Referenced by read().

317  {
318  $this->day_start = $a_start;
319  }
+ Here is the caller graph for this function:

◆ setDefaultTimeFormat()

ilCalendarSettings::setDefaultTimeFormat (   $a_format)

set default time format

public

Parameters
inttime format
Returns

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

Referenced by read().

287  {
288  $this->time_format = $a_format;
289  }
+ Here is the caller graph for this function:

◆ setDefaultTimeZone()

ilCalendarSettings::setDefaultTimeZone (   $a_zone)

set default timezone

public

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

References timezone.

Referenced by read().

242  {
243  $this->timezone = $a_zone;
244  }
Set timezone
+ Here is the caller graph for this function:

◆ setDefaultWeekStart()

ilCalendarSettings::setDefaultWeekStart (   $a_start)

set week start

public

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

Referenced by read().

221  {
222  $this->week_start = $a_start;
223  }
+ Here is the caller graph for this function:

◆ setEnabled()

ilCalendarSettings::setEnabled (   $a_enabled)

set enabled

public

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

Referenced by read().

199  {
200  $this->enabled = $a_enabled;
201  }
+ Here is the caller graph for this function:

◆ setEnableGroupMilestones()

ilCalendarSettings::setEnableGroupMilestones (   $a_enablegroupmilestones)

Set Enable milestone planning feature for groups.

Parameters
boolean$a_enablegroupmilestonesEnable milestone planning feature for groups

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

Referenced by read().

377  {
378  $this->enablegroupmilestones = $a_enablegroupmilestones;
379  }
+ Here is the caller graph for this function:

◆ setSynchronisationCacheMinutes()

ilCalendarSettings::setSynchronisationCacheMinutes (   $a_min)

Set synchronisation cache minutes.

Parameters
object$a_min
Returns

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

Referenced by read().

415  {
416  $this->sync_cache_minutes = $a_min;
417  }
+ Here is the caller graph for this function:

◆ setWebCalSyncHours()

ilCalendarSettings::setWebCalSyncHours (   $a_hours)

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

Referenced by read().

503  {
504  $this->webcal_sync_hours = $a_hours;
505  }
+ Here is the caller graph for this function:

◆ useCache()

ilCalendarSettings::useCache (   $a_status)

Enable cache.

Parameters
object$a_status
Returns

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

Referenced by read().

160  {
161  $this->cache_enabled = $a_status;
162  }
+ Here is the caller graph for this function:

Field Documentation

◆ $cache_enabled

ilCalendarSettings::$cache_enabled = true
private

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

Referenced by isCacheUsed(), and read().

◆ $cache_minutes

ilCalendarSettings::$cache_minutes = 1
private

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

Referenced by getCacheMinutes().

◆ $cal_settings_id

ilCalendarSettings::$cal_settings_id = 0
private

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

Referenced by getCalendarSettingsId().

◆ $cg_registration

ilCalendarSettings::$cg_registration = false
private

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

Referenced by isCGRegistrationEnabled().

◆ $consultation_hours

ilCalendarSettings::$consultation_hours = false
private

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

Referenced by areConsultationHoursEnabled().

◆ $course_cal_enabled

ilCalendarSettings::$course_cal_enabled = true
private

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

Referenced by isCourseCalendarEnabled().

◆ $day_end

ilCalendarSettings::$day_end = null
private

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

Referenced by getDefaultDayEnd().

◆ $day_start

ilCalendarSettings::$day_start = null
private

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

Referenced by getDefaultDayStart().

◆ $db

ilCalendarSettings::$db = null
private

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

◆ $enabled

ilCalendarSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $group_cal_enabled

ilCalendarSettings::$group_cal_enabled = true
private

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

Referenced by isGroupCalendarEnabled().

◆ $instance

ilCalendarSettings::$instance = null
staticprivate

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

◆ $notification

ilCalendarSettings::$notification = false
private

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

Referenced by isNotificationEnabled().

◆ $notification_user

ilCalendarSettings::$notification_user = false
private

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

Referenced by isUserNotificationEnabled().

◆ $storage

ilCalendarSettings::$storage = null
private

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

◆ $sync_cache_enabled

ilCalendarSettings::$sync_cache_enabled = true
private

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

Referenced by isSynchronisationCacheEnabled().

◆ $sync_cache_minutes

ilCalendarSettings::$sync_cache_minutes = 10
private

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

Referenced by getSynchronisationCacheMinutes().

◆ $time_format

ilCalendarSettings::$time_format = null
private

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

Referenced by getDefaultTimeFormat().

◆ $timezone

ilCalendarSettings::$timezone = null
private

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

Referenced by getDefaultTimeZone().

◆ $webcal_sync

ilCalendarSettings::$webcal_sync = false
private

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

Referenced by isWebCalSyncEnabled().

◆ $webcal_sync_hours

ilCalendarSettings::$webcal_sync_hours = 2
private

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

Referenced by getWebCalSyncHours().

◆ $week_start

ilCalendarSettings::$week_start = 0
private

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

Referenced by getDefaultWeekStart().

◆ DATE_FORMAT_DMY

◆ DATE_FORMAT_MDY

◆ DATE_FORMAT_YMD

◆ DEFAULT_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_CACHE_MINUTES = 0

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

◆ DEFAULT_DAY_END

const ilCalendarSettings::DEFAULT_DAY_END = 19

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

Referenced by ilCalendarUserSettings\read().

◆ DEFAULT_DAY_START

const ilCalendarSettings::DEFAULT_DAY_START = 8

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

Referenced by ilCalendarUserSettings\read().

◆ DEFAULT_SYNC_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_SYNC_CACHE_MINUTES = 10

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

◆ TIME_FORMAT_12

◆ TIME_FORMAT_24

◆ WEEK_START_MONDAY

const ilCalendarSettings::WEEK_START_MONDAY = 1

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

Referenced by ilCalendarRecurrence\toICal().

◆ WEEK_START_SUNDAY

const ilCalendarSettings::WEEK_START_SUNDAY = 0

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


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