ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 getDefaultCal ()
 
 setDefaultCal (int $default_cal)
 
 getDefaultPeriod ()
 
 setDefaultPeriod (int $default_period)
 
 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 ()
 
 isCourseCalendarVisible ()
 
 setCourseCalendarVisible (bool $status)
 
 isObjectCalendarVisible (string $type)
 
 enableGroupCalendar ($a_stat)
 
 isGroupCalendarEnabled ()
 
 isGroupCalendarVisible ()
 
 setGroupCalendarVisible (bool $status)
 
 enableWebCalSync ($a_stat)
 
 isWebCalSyncEnabled ()
 
 setWebCalSyncHours ($a_hours)
 
 getWebCalSyncHours ()
 
 setShowWeeks ($a_val)
 Set show weeks. More...
 
 getShowWeeks ()
 Get show weeks. More...
 
 enableBatchFileDownloads ($a_stat)
 
 isBatchFileDownloadsEnabled ()
 
 save ()
 save More...
 

Static Public Member Functions

static _getInstance ()
 get singleton instance More...
 
static lookupCalendarContentPresentationEnabled (int $obj_id)
 
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 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
 

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
 
 $default_cal = self::DEFAULT_CAL_LIST
 
 $default_period = 2
 
 $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
 
 $course_cal_visible = true
 
 $group_cal_visible = true
 
 $webcal_sync = false
 
 $webcal_sync_hours = 2
 
 $show_weeks = false
 
 $batch_file_downloads = false
 

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

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

105  {
106  global $DIC;
107 
108  $ilDB = $DIC['ilDB'];
109 
110  $this->db = $ilDB;
111 
112  $this->initStorage();
113  $this->read();
114  $this->readCalendarSettingsId();
115  }
global $DIC
Definition: goto.php:24
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

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

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

125  {
126  if (self::$instance) {
127  return self::$instance;
128  }
129  return self::$instance = new ilCalendarSettings();
130  }
+ Here is the caller graph for this function:

◆ areConsultationHoursEnabled()

ilCalendarSettings::areConsultationHoursEnabled ( )

Check if consultation hours are enabled.

Returns

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

References $consultation_hours.

Referenced by save().

407  {
409  }
+ Here is the caller graph for this function:

◆ enableBatchFileDownloads()

ilCalendarSettings::enableBatchFileDownloads (   $a_stat)

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

Referenced by read().

626  {
627  $this->batch_file_downloads = $a_stat;
628  }
+ 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 524 of file class.ilCalendarSettings.php.

Referenced by read().

525  {
526  $this->cg_registration = $a_status;
527  }
+ Here is the caller graph for this function:

◆ enableConsultationHours()

ilCalendarSettings::enableConsultationHours (   $a_status)

En/Disable consultation hours.

Returns

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

Referenced by read().

416  {
417  $this->consultation_hours = $a_status;
418  }
+ Here is the caller graph for this function:

◆ enableCourseCalendar()

ilCalendarSettings::enableCourseCalendar (   $a_stat)

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

Referenced by read().

535  {
536  $this->course_cal_enabled = $a_stat;
537  }
+ Here is the caller graph for this function:

◆ enableGroupCalendar()

ilCalendarSettings::enableGroupCalendar (   $a_stat)

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

Referenced by read().

566  {
567  $this->group_cal_enabled = $a_stat;
568  }
+ 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 504 of file class.ilCalendarSettings.php.

References notification().

Referenced by read().

505  {
506  $this->notification = $a_status;
507  }
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 466 of file class.ilCalendarSettings.php.

Referenced by read().

467  {
468  $this->sync_cache_enabled = $a_status;
469  }
+ Here is the caller graph for this function:

◆ enableUserNotification()

ilCalendarSettings::enableUserNotification (   $a_not)

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

Referenced by read().

515  {
516  $this->notification_user = $a_not;
517  }
+ Here is the caller graph for this function:

◆ enableWebCalSync()

ilCalendarSettings::enableWebCalSync (   $a_stat)

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

Referenced by read().

586  {
587  $this->webcal_sync = $a_stat;
588  }
+ Here is the caller graph for this function:

◆ getCacheMinutes()

ilCalendarSettings::getCacheMinutes ( )

Get cache minutes.

Returns

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

References $cache_minutes.

Referenced by save().

217  {
218  return (int) $this->cache_minutes;
219  }
+ Here is the caller graph for this function:

◆ getCalendarSettingsId()

ilCalendarSettings::getCalendarSettingsId ( )

Get calendar settings id (Used for permission checks)

public

Returns

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

References $cal_settings_id.

429  {
430  return $this->cal_settings_id;
431  }

◆ getDefaultCal()

ilCalendarSettings::getDefaultCal ( )
Returns
int

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

References $default_cal.

Referenced by save().

269  : int
270  {
271  return $this->default_cal;
272  }
+ Here is the caller graph for this function:

◆ getDefaultDateFormat()

ilCalendarSettings::getDefaultDateFormat ( )

get default date format

public

Returns
int date format

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

Referenced by save().

337  {
338  return $this->date_format;
339  }
+ Here is the caller graph for this function:

◆ getDefaultDayEnd()

ilCalendarSettings::getDefaultDayEnd ( )

Get default end of day.

Returns

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

References $day_end.

Referenced by save().

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

◆ getDefaultDayStart()

ilCalendarSettings::getDefaultDayStart ( )

Get default end of day.

Returns

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

References $day_start.

Referenced by save().

369  {
370  return $this->day_start;
371  }
+ Here is the caller graph for this function:

◆ getDefaultPeriod()

ilCalendarSettings::getDefaultPeriod ( )
Returns
int

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

References $default_period.

Referenced by save().

285  : int
286  {
287  return $this->default_period;
288  }
+ Here is the caller graph for this function:

◆ getDefaultTimeFormat()

ilCalendarSettings::getDefaultTimeFormat ( )

get default time format

public

Returns
int time format

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

References $time_format.

Referenced by save().

360  {
361  return $this->time_format;
362  }
+ Here is the caller graph for this function:

◆ getDefaultTimeZone()

ilCalendarSettings::getDefaultTimeZone ( )

get derfault time zone

public

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

References $timezone.

Referenced by save().

314  {
315  return $this->timezone;
316  }
+ Here is the caller graph for this function:

◆ getDefaultWeekStart()

ilCalendarSettings::getDefaultWeekStart ( )

get default week start

public

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

References $week_start.

Referenced by save().

261  {
262  return $this->week_start;
263  }
+ 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 448 of file class.ilCalendarSettings.php.

Referenced by save().

449  {
450  return $this->enablegroupmilestones;
451  }
+ Here is the caller graph for this function:

◆ getShowWeeks()

ilCalendarSettings::getShowWeeks ( )

Get show weeks.

Returns
bool show weeks

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

References $show_weeks.

Referenced by save().

621  {
622  return $this->show_weeks;
623  }
+ Here is the caller graph for this function:

◆ getSynchronisationCacheMinutes()

ilCalendarSettings::getSynchronisationCacheMinutes ( )

get synchronisation cache minutes

Returns

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

References $sync_cache_minutes.

Referenced by save().

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

◆ getWebCalSyncHours()

ilCalendarSettings::getWebCalSyncHours ( )

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

References $webcal_sync_hours.

Referenced by save().

601  {
603  }
+ Here is the caller graph for this function:

◆ initStorage()

ilCalendarSettings::initStorage ( )
private

Init storage class (ilSetting) private.

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

Referenced by __construct().

733  {
734  include_once('./Services/Administration/classes/class.ilSetting.php');
735  $this->storage = new ilSetting('calendar');
736  }
+ Here is the caller graph for this function:

◆ isBatchFileDownloadsEnabled()

ilCalendarSettings::isBatchFileDownloadsEnabled ( )

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

References $batch_file_downloads.

Referenced by save().

+ Here is the caller graph for this function:

◆ isCacheUsed()

ilCalendarSettings::isCacheUsed ( )

Check if cache is used.

Returns

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

References $cache_enabled.

Referenced by save().

198  {
199  return $this->cache_enabled;
200  }
+ Here is the caller graph for this function:

◆ isCGRegistrationEnabled()

ilCalendarSettings::isCGRegistrationEnabled ( )

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

References $cg_registration.

Referenced by save().

530  {
531  return $this->cg_registration;
532  }
+ Here is the caller graph for this function:

◆ isCourseCalendarEnabled()

ilCalendarSettings::isCourseCalendarEnabled ( )

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

References $course_cal_enabled.

Referenced by save().

540  {
542  }
+ Here is the caller graph for this function:

◆ isCourseCalendarVisible()

ilCalendarSettings::isCourseCalendarVisible ( )

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

References $course_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

544  : bool
545  {
547  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilCalendarSettings::isEnabled ( )

is calendar enabled

public

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

References $enabled.

Referenced by lookupCalendarActivated(), and save().

239  {
240  return (bool) $this->enabled;
241  }
+ Here is the caller graph for this function:

◆ isGroupCalendarEnabled()

ilCalendarSettings::isGroupCalendarEnabled ( )

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

References $group_cal_enabled.

Referenced by save().

571  {
573  }
+ Here is the caller graph for this function:

◆ isGroupCalendarVisible()

ilCalendarSettings::isGroupCalendarVisible ( )

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

References $group_cal_visible.

Referenced by isObjectCalendarVisible(), and save().

575  : bool
576  {
578  }
+ Here is the caller graph for this function:

◆ isNotificationEnabled()

ilCalendarSettings::isNotificationEnabled ( )

Course group notification enabled.

Returns

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

References $notification.

Referenced by save().

495  {
496  return (bool) $this->notification;
497  }
+ Here is the caller graph for this function:

◆ isObjectCalendarVisible()

ilCalendarSettings::isObjectCalendarVisible ( string  $type)

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

References isCourseCalendarVisible(), and isGroupCalendarVisible().

554  : bool
555  {
556  switch ($type) {
557  case 'crs':
558  return $this->isCourseCalendarVisible();
559  case 'grp':
560  return $this->isGroupCalendarVisible();
561  }
562  return false;
563  }
$type
+ Here is the call graph for this function:

◆ isSynchronisationCacheEnabled()

ilCalendarSettings::isSynchronisationCacheEnabled ( )

Check if cache is active for calendar synchronisation.

Returns

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

References $sync_cache_enabled.

Referenced by read(), and save().

458  {
459  return (bool) $this->sync_cache_enabled;
460  }
+ Here is the caller graph for this function:

◆ isUserNotificationEnabled()

ilCalendarSettings::isUserNotificationEnabled ( )

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

References $notification_user.

Referenced by save().

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

◆ isWebCalSyncEnabled()

ilCalendarSettings::isWebCalSyncEnabled ( )

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

References $webcal_sync.

Referenced by save().

591  {
592  return $this->webcal_sync;
593  }
+ Here is the caller graph for this function:

◆ lookupCalendarActivated()

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

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

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

Referenced by ilObjectServiceSettingsGUI\initServiceSettingsForm().

155  {
157  return false;
158  }
159  $type = ilObject::_lookupType($a_obj_id);
160  // lookup global setting
161  $gl_activated = false;
162  switch ($type) {
163  case 'crs':
164  $gl_activated = ilCalendarSettings::_getInstance()->isCourseCalendarEnabled();
165  break;
166 
167  case 'grp':
168  $gl_activated = ilCalendarSettings::_getInstance()->isGroupCalendarEnabled();
169  break;
170 
171  default:
172  return false;
173  }
174  // look individual object setting
175  include_once './Services/Container/classes/class.ilContainer.php';
177  $a_obj_id,
178  'cont_activation_calendar',
179  $gl_activated
180  );
181  }
static _getInstance()
get singleton instance
$type
static _lookupType($a_id, $a_reference=false)
lookup object type
isEnabled()
is calendar enabled
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupCalendarContentPresentationEnabled()

static ilCalendarSettings::lookupCalendarContentPresentationEnabled ( int  $obj_id)
static
Parameters
int$obj_id
Returns
bool

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

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

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

136  : bool
137  {
138  if (!self::lookupCalendarActivated($obj_id)) {
139  return false;
140  }
141  $settings = self::_getInstance();
142  $type = ilObject::_lookupType($obj_id);
143  $default = $settings->isObjectCalendarVisible($type);
145  $obj_id,
146  'cont_show_calendar', // @todo create ilContainer constant
147  $default
148  );
149  }
$type
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ 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 677 of file class.ilCalendarSettings.php.

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

Referenced by __construct().

678  {
679  $this->setEnabled($this->storage->get('enabled'));
680  $this->setDefaultTimeZone($this->storage->get('default_timezone', ilTimeZone::_getDefaultTimeZone()));
681  $this->setDefaultWeekStart($this->storage->get('default_week_start', self::WEEK_START_MONDAY));
682  $this->setDefaultDateFormat($this->storage->get('default_date_format', self::DATE_FORMAT_DMY));
683  $this->setDefaultTimeFormat($this->storage->get('default_time_format', self::TIME_FORMAT_24));
684  $this->setEnableGroupMilestones($this->storage->get('enable_grp_milestones'));
685  $this->setDefaultDayStart($this->storage->get('default_day_start', self::DEFAULT_DAY_START));
686  $this->setDefaultDayEnd($this->storage->get('default_day_end', self::DEFAULT_DAY_END));
687  $this->useCache($this->storage->get('cache_enabled'), $this->cache_enabled);
688  $this->setCacheMinutes($this->storage->get('cache_minutes', self::DEFAULT_CACHE_MINUTES));
689  $this->enableSynchronisationCache($this->storage->get('sync_cache_enabled'), $this->isSynchronisationCacheEnabled());
690  $this->setSynchronisationCacheMinutes($this->storage->get('sync_cache_minutes', self::DEFAULT_SYNC_CACHE_MINUTES));
691  $this->enableNotification($this->storage->get('notification', $this->isNotificationEnabled()));
692  $this->enableConsultationHours($this->storage->get('consultation_hours', $this->areConsultationHoursEnabled()));
693  $this->enableCGRegistration($this->storage->get('cg_registration', $this->isCGRegistrationEnabled()));
694  $this->enableCourseCalendar($this->storage->get('course_cal', $this->isCourseCalendarEnabled()));
695  $this->setCourseCalendarVisible($this->storage->get('course_cal_visible', $this->isCourseCalendarVisible()));
696  $this->enableGroupCalendar($this->storage->get('group_cal', $this->isGroupCalendarEnabled()));
697  $this->setGroupCalendarVisible($this->storage->get('group_cal_visible', $this->isGroupCalendarVisible()));
698  $this->enableUserNotification($this->storage->get('notification_user', $this->isUserNotificationEnabled()));
699  $this->enableWebCalSync($this->storage->get('webcal_sync', $this->isWebCalSyncEnabled()));
700  $this->setWebCalSyncHours($this->storage->get('webcal_sync_hours', $this->getWebCalSyncHours()));
701  $this->setShowWeeks($this->storage->get('show_weeks', $this->getShowWeeks()));
702  $this->enableBatchFileDownloads($this->storage->get('batch_files', $this->isBatchFileDownloadsEnabled()));
703  $this->setDefaultCal($this->storage->get('default_calendar_view', $this->getDefaultCal()));
704  $this->setDefaultPeriod($this->storage->get('default_period', $this->getDefaultPeriod()));
705  }
static _getDefaultTimeZone()
Calculate and set default time zone.
setSynchronisationCacheMinutes($a_min)
Set synchronisation cache minutes.
enableConsultationHours($a_status)
En/Disable consultation hours.
setShowWeeks($a_val)
Set show weeks.
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
setCourseCalendarVisible(bool $status)
setDefaultPeriod(int $default_period)
enableSynchronisationCache($a_status)
En/Disable synchronisation cache.
setDefaultCal(int $default_cal)
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 714 of file class.ilCalendarSettings.php.

References $query.

Referenced by __construct().

715  {
716  $query = "SELECT ref_id FROM object_reference obr " .
717  "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
718  "WHERE type = 'cals'";
719 
720  $set = $this->db->query($query);
721  $row = $this->db->fetchAssoc($set);
722 
723  $this->cal_settings_id = $row["ref_id"];
724  return true;
725  }
$query
+ Here is the caller graph for this function:

◆ save()

ilCalendarSettings::save ( )

save

public

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

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

641  {
642  $this->storage->set('enabled', (int) $this->isEnabled());
643  $this->storage->set('default_timezone', $this->getDefaultTimeZone());
644  $this->storage->set('default_week_start', $this->getDefaultWeekStart());
645  $this->storage->set('default_date_format', $this->getDefaultDateFormat());
646  $this->storage->set('default_time_format', $this->getDefaultTimeFormat());
647  $this->storage->set('enable_grp_milestones', (int) $this->getEnableGroupMilestones());
648  $this->storage->set('default_day_start', (int) $this->getDefaultDayStart());
649  $this->storage->set('default_day_end', (int) $this->getDefaultDayEnd());
650  $this->storage->set('cache_minutes', (int) $this->getCacheMinutes());
651  $this->storage->set('sync_cache_enabled', (int) $this->isSynchronisationCacheEnabled());
652  $this->storage->set('sync_cache_minutes', (int) $this->getSynchronisationCacheMinutes());
653  $this->storage->set('cache_enabled', (int) $this->isCacheUsed());
654  $this->storage->set('notification', (int) $this->isNotificationEnabled());
655  $this->storage->set('consultation_hours', (int) $this->areConsultationHoursEnabled());
656  $this->storage->set('cg_registration', (int) $this->isCGRegistrationEnabled());
657  $this->storage->set('course_cal', (int) $this->isCourseCalendarEnabled());
658  $this->storage->set('course_cal_visible', (int) $this->isCourseCalendarVisible());
659  $this->storage->set('group_cal', (int) $this->isGroupCalendarEnabled());
660  $this->storage->set('group_cal_visible', (int) $this->isGroupCalendarVisible());
661  $this->storage->set('notification_user', (int) $this->isUserNotificationEnabled());
662  $this->storage->set('webcal_sync', (int) $this->isWebCalSyncEnabled());
663  $this->storage->set('webcal_sync_hours', (int) $this->getWebCalSyncHours());
664  $this->storage->set('show_weeks', (int) $this->getShowWeeks());
665  $this->storage->set('batch_files', (int) $this->isBatchFileDownloadsEnabled());
666  $this->storage->set('default_calendar_view', (int) $this->getDefaultCal());
667  $this->storage->set('default_period', (int) $this->getDefaultPeriod());
668  }
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.
getShowWeeks()
Get show weeks.
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 207 of file class.ilCalendarSettings.php.

Referenced by read().

208  {
209  $this->cache_minutes = $a_min;
210  }
+ Here is the caller graph for this function:

◆ setCourseCalendarVisible()

ilCalendarSettings::setCourseCalendarVisible ( bool  $status)

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

Referenced by read().

550  {
551  $this->course_cal_visible = $status;
552  }
+ Here is the caller graph for this function:

◆ setDefaultCal()

ilCalendarSettings::setDefaultCal ( int  $default_cal)
Parameters
int$default_cal

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

References $default_cal.

Referenced by read().

277  : void
278  {
279  $this->default_cal = $default_cal;
280  }
+ 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 325 of file class.ilCalendarSettings.php.

Referenced by read().

326  {
327  $this->date_format = $a_format;
328  }
+ 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 397 of file class.ilCalendarSettings.php.

Referenced by read().

398  {
399  $this->day_end = $a_end;
400  }
+ 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 378 of file class.ilCalendarSettings.php.

Referenced by read().

379  {
380  $this->day_start = $a_start;
381  }
+ Here is the caller graph for this function:

◆ setDefaultPeriod()

ilCalendarSettings::setDefaultPeriod ( int  $default_period)
Parameters
int$default_period

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

References $default_period.

Referenced by read().

293  : void
294  {
295  $this->default_period = $default_period;
296  }
+ 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 348 of file class.ilCalendarSettings.php.

Referenced by read().

349  {
350  $this->time_format = $a_format;
351  }
+ Here is the caller graph for this function:

◆ setDefaultTimeZone()

ilCalendarSettings::setDefaultTimeZone (   $a_zone)

set default timezone

public

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

Referenced by read().

304  {
305  $this->timezone = $a_zone;
306  }
+ Here is the caller graph for this function:

◆ setDefaultWeekStart()

ilCalendarSettings::setDefaultWeekStart (   $a_start)

set week start

public

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

Referenced by read().

250  {
251  $this->week_start = $a_start;
252  }
+ Here is the caller graph for this function:

◆ setEnabled()

ilCalendarSettings::setEnabled (   $a_enabled)

set enabled

public

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

Referenced by read().

228  {
229  $this->enabled = $a_enabled;
230  }
+ 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 438 of file class.ilCalendarSettings.php.

Referenced by read().

439  {
440  $this->enablegroupmilestones = $a_enablegroupmilestones;
441  }
+ Here is the caller graph for this function:

◆ setGroupCalendarVisible()

ilCalendarSettings::setGroupCalendarVisible ( bool  $status)

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

Referenced by read().

581  {
582  $this->group_cal_visible = $status;
583  }
+ Here is the caller graph for this function:

◆ setShowWeeks()

ilCalendarSettings::setShowWeeks (   $a_val)

Set show weeks.

Parameters
bool$a_valshow weeks

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

Referenced by read().

611  {
612  $this->show_weeks = $a_val;
613  }
+ 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 476 of file class.ilCalendarSettings.php.

Referenced by read().

477  {
478  $this->sync_cache_minutes = $a_min;
479  }
+ Here is the caller graph for this function:

◆ setWebCalSyncHours()

ilCalendarSettings::setWebCalSyncHours (   $a_hours)

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

Referenced by read().

596  {
597  $this->webcal_sync_hours = $a_hours;
598  }
+ Here is the caller graph for this function:

◆ useCache()

ilCalendarSettings::useCache (   $a_status)

Enable cache.

Parameters
object$a_status
Returns

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

Referenced by read().

189  {
190  $this->cache_enabled = $a_status;
191  }
+ Here is the caller graph for this function:

Field Documentation

◆ $batch_file_downloads

ilCalendarSettings::$batch_file_downloads = false
private

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

Referenced by isBatchFileDownloadsEnabled().

◆ $cache_enabled

ilCalendarSettings::$cache_enabled = true
private

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

Referenced by isCacheUsed(), and read().

◆ $cache_minutes

ilCalendarSettings::$cache_minutes = 1
private

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

Referenced by getCacheMinutes().

◆ $cal_settings_id

ilCalendarSettings::$cal_settings_id = 0
private

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

Referenced by getCalendarSettingsId().

◆ $cg_registration

ilCalendarSettings::$cg_registration = false
private

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

Referenced by isCGRegistrationEnabled().

◆ $consultation_hours

ilCalendarSettings::$consultation_hours = false
private

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

Referenced by areConsultationHoursEnabled().

◆ $course_cal_enabled

ilCalendarSettings::$course_cal_enabled = true
private

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

Referenced by isCourseCalendarEnabled().

◆ $course_cal_visible

ilCalendarSettings::$course_cal_visible = true
private

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

Referenced by isCourseCalendarVisible().

◆ $day_end

ilCalendarSettings::$day_end = null
private

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

Referenced by getDefaultDayEnd().

◆ $day_start

ilCalendarSettings::$day_start = null
private

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

Referenced by getDefaultDayStart().

◆ $db

ilCalendarSettings::$db = null
private

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

◆ $default_cal

ilCalendarSettings::$default_cal = self::DEFAULT_CAL_LIST
private

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

Referenced by getDefaultCal(), and setDefaultCal().

◆ $default_period

ilCalendarSettings::$default_period = 2
private

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

Referenced by getDefaultPeriod(), and setDefaultPeriod().

◆ $enabled

ilCalendarSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $group_cal_enabled

ilCalendarSettings::$group_cal_enabled = true
private

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

Referenced by isGroupCalendarEnabled().

◆ $group_cal_visible

ilCalendarSettings::$group_cal_visible = true
private

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

Referenced by isGroupCalendarVisible().

◆ $instance

ilCalendarSettings::$instance = null
staticprivate

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

◆ $notification

ilCalendarSettings::$notification = false
private

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

Referenced by isNotificationEnabled().

◆ $notification_user

ilCalendarSettings::$notification_user = false
private

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

Referenced by isUserNotificationEnabled().

◆ $show_weeks

ilCalendarSettings::$show_weeks = false
private

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

Referenced by getShowWeeks().

◆ $storage

ilCalendarSettings::$storage = null
private

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

◆ $sync_cache_enabled

ilCalendarSettings::$sync_cache_enabled = true
private

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

Referenced by isSynchronisationCacheEnabled().

◆ $sync_cache_minutes

ilCalendarSettings::$sync_cache_minutes = 10
private

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

Referenced by getSynchronisationCacheMinutes().

◆ $time_format

ilCalendarSettings::$time_format = null
private

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

Referenced by getDefaultTimeFormat().

◆ $timezone

ilCalendarSettings::$timezone = null
private

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

Referenced by getDefaultTimeZone().

◆ $webcal_sync

ilCalendarSettings::$webcal_sync = false
private

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

Referenced by isWebCalSyncEnabled().

◆ $webcal_sync_hours

ilCalendarSettings::$webcal_sync_hours = 2
private

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

Referenced by getWebCalSyncHours().

◆ $week_start

ilCalendarSettings::$week_start = 0
private

Definition at line 66 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 55 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 41 of file class.ilCalendarSettings.php.

◆ DEFAULT_DAY_START

const ilCalendarSettings::DEFAULT_DAY_START = 8

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

◆ DEFAULT_SHOW_WEEKS

const ilCalendarSettings::DEFAULT_SHOW_WEEKS = true

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

◆ DEFAULT_SYNC_CACHE_MINUTES

const ilCalendarSettings::DEFAULT_SYNC_CACHE_MINUTES = 10

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

Referenced by ilCalendarSchedule\initPeriod().


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