ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 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 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
 
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
 
 $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
 
 $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 95 of file class.ilCalendarSettings.php.

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

96  {
97  global $DIC;
98 
99  $ilDB = $DIC['ilDB'];
100 
101  $this->db = $ilDB;
102 
103  $this->initStorage();
104  $this->read();
105  $this->readCalendarSettingsId();
106  }
global $DIC
Definition: saml.php:7
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 116 of file class.ilCalendarSettings.php.

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

117  {
118  if (self::$instance) {
119  return self::$instance;
120  }
121  return self::$instance = new ilCalendarSettings();
122  }
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 347 of file class.ilCalendarSettings.php.

References $consultation_hours.

Referenced by save().

348  {
350  }
+ Here is the caller graph for this function:

◆ enableBatchFileDownloads()

ilCalendarSettings::enableBatchFileDownloads (   $a_stat)

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

Referenced by read().

536  {
537  $this->batch_file_downloads = $a_stat;
538  }
+ 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 465 of file class.ilCalendarSettings.php.

Referenced by read().

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

◆ enableConsultationHours()

ilCalendarSettings::enableConsultationHours (   $a_status)

En/Disable consultation hours.

Returns

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

Referenced by read().

357  {
358  $this->consultation_hours = $a_status;
359  }
+ Here is the caller graph for this function:

◆ enableCourseCalendar()

ilCalendarSettings::enableCourseCalendar (   $a_stat)

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

Referenced by read().

476  {
477  $this->course_cal_enabled = $a_stat;
478  }
+ Here is the caller graph for this function:

◆ enableGroupCalendar()

ilCalendarSettings::enableGroupCalendar (   $a_stat)

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

Referenced by read().

486  {
487  $this->group_cal_enabled = $a_stat;
488  }
+ 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 445 of file class.ilCalendarSettings.php.

References notification().

Referenced by read().

446  {
447  $this->notification = $a_status;
448  }
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 407 of file class.ilCalendarSettings.php.

Referenced by read().

408  {
409  $this->sync_cache_enabled = $a_status;
410  }
+ Here is the caller graph for this function:

◆ enableUserNotification()

ilCalendarSettings::enableUserNotification (   $a_not)

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

Referenced by read().

456  {
457  $this->notification_user = $a_not;
458  }
+ Here is the caller graph for this function:

◆ enableWebCalSync()

ilCalendarSettings::enableWebCalSync (   $a_stat)

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

Referenced by read().

496  {
497  $this->webcal_sync = $a_stat;
498  }
+ Here is the caller graph for this function:

◆ getCacheMinutes()

ilCalendarSettings::getCacheMinutes ( )

Get cache minutes.

Returns

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

References $cache_minutes.

Referenced by save().

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

◆ getCalendarSettingsId()

ilCalendarSettings::getCalendarSettingsId ( )

Get calendar settings id (Used for permission checks)

public

Returns

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

References $cal_settings_id.

370  {
371  return $this->cal_settings_id;
372  }

◆ getDefaultDateFormat()

ilCalendarSettings::getDefaultDateFormat ( )

get default date format

public

Returns
int date format

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

Referenced by save().

278  {
279  return $this->date_format;
280  }
+ Here is the caller graph for this function:

◆ getDefaultDayEnd()

ilCalendarSettings::getDefaultDayEnd ( )

Get default end of day.

Returns

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

References $day_end.

Referenced by save().

329  {
330  return $this->day_end;
331  }
+ Here is the caller graph for this function:

◆ getDefaultDayStart()

ilCalendarSettings::getDefaultDayStart ( )

Get default end of day.

Returns

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

References $day_start.

Referenced by save().

310  {
311  return $this->day_start;
312  }
+ Here is the caller graph for this function:

◆ getDefaultTimeFormat()

ilCalendarSettings::getDefaultTimeFormat ( )

get default time format

public

Returns
int time format

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

References $time_format.

Referenced by save().

301  {
302  return $this->time_format;
303  }
+ Here is the caller graph for this function:

◆ getDefaultTimeZone()

ilCalendarSettings::getDefaultTimeZone ( )

get derfault time zone

public

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

References $timezone.

Referenced by save().

255  {
256  return $this->timezone;
257  }
+ Here is the caller graph for this function:

◆ getDefaultWeekStart()

ilCalendarSettings::getDefaultWeekStart ( )

get default week start

public

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

References $week_start.

Referenced by save().

235  {
236  return $this->week_start;
237  }
+ 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 389 of file class.ilCalendarSettings.php.

Referenced by save().

390  {
391  return $this->enablegroupmilestones;
392  }
+ Here is the caller graph for this function:

◆ getShowWeeks()

ilCalendarSettings::getShowWeeks ( )

Get show weeks.

Returns
bool show weeks

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

References $show_weeks.

Referenced by save().

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

◆ getSynchronisationCacheMinutes()

ilCalendarSettings::getSynchronisationCacheMinutes ( )

get synchronisation cache minutes

Returns

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

References $sync_cache_minutes.

Referenced by save().

427  {
429  }
+ Here is the caller graph for this function:

◆ getWebCalSyncHours()

ilCalendarSettings::getWebCalSyncHours ( )

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

References $webcal_sync_hours.

Referenced by save().

511  {
513  }
+ Here is the caller graph for this function:

◆ initStorage()

ilCalendarSettings::initStorage ( )
private

Init storage class (ilSetting) private.

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

Referenced by __construct().

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

◆ isBatchFileDownloadsEnabled()

ilCalendarSettings::isBatchFileDownloadsEnabled ( )

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

References $cache_enabled.

Referenced by save().

172  {
173  return $this->cache_enabled;
174  }
+ Here is the caller graph for this function:

◆ isCGRegistrationEnabled()

ilCalendarSettings::isCGRegistrationEnabled ( )

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

References $cg_registration.

Referenced by save().

471  {
472  return $this->cg_registration;
473  }
+ Here is the caller graph for this function:

◆ isCourseCalendarEnabled()

ilCalendarSettings::isCourseCalendarEnabled ( )

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

References $course_cal_enabled.

Referenced by save().

481  {
483  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilCalendarSettings::isEnabled ( )

is calendar enabled

public

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

References $enabled.

Referenced by lookupCalendarActivated(), and save().

213  {
214  return (bool) $this->enabled;
215  }
+ Here is the caller graph for this function:

◆ isGroupCalendarEnabled()

ilCalendarSettings::isGroupCalendarEnabled ( )

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

References $group_cal_enabled.

Referenced by save().

491  {
493  }
+ Here is the caller graph for this function:

◆ isNotificationEnabled()

ilCalendarSettings::isNotificationEnabled ( )

Course group notification enabled.

Returns

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

References $notification.

Referenced by save().

436  {
437  return (bool) $this->notification;
438  }
+ Here is the caller graph for this function:

◆ isSynchronisationCacheEnabled()

ilCalendarSettings::isSynchronisationCacheEnabled ( )

Check if cache is active for calendar synchronisation.

Returns

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

References $sync_cache_enabled.

Referenced by read(), and save().

399  {
400  return (bool) $this->sync_cache_enabled;
401  }
+ Here is the caller graph for this function:

◆ isUserNotificationEnabled()

ilCalendarSettings::isUserNotificationEnabled ( )

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

References $notification_user.

Referenced by save().

451  {
453  }
+ Here is the caller graph for this function:

◆ isWebCalSyncEnabled()

ilCalendarSettings::isWebCalSyncEnabled ( )

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

References $webcal_sync.

Referenced by save().

501  {
502  return $this->webcal_sync;
503  }
+ Here is the caller graph for this function:

◆ lookupCalendarActivated()

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

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

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

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

129  {
131  return false;
132  }
133  $type = ilObject::_lookupType($a_obj_id);
134  // lookup global setting
135  $gl_activated = false;
136  switch ($type) {
137  case 'crs':
138  $gl_activated = ilCalendarSettings::_getInstance()->isCourseCalendarEnabled();
139  break;
140 
141  case 'grp':
142  $gl_activated = ilCalendarSettings::_getInstance()->isGroupCalendarEnabled();
143  break;
144 
145  default:
146  return false;
147  }
148  // look individual object setting
149  include_once './Services/Container/classes/class.ilContainer.php';
151  $a_obj_id,
152  'cont_show_calendar',
153  $gl_activated
154  );
155  }
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:

◆ read()

ilCalendarSettings::read ( )
private

Read settings.

private

Parameters

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

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

Referenced by __construct().

584  {
585  $this->setEnabled($this->storage->get('enabled'));
586  $this->setDefaultTimeZone($this->storage->get('default_timezone', ilTimeZone::_getDefaultTimeZone()));
587  $this->setDefaultWeekStart($this->storage->get('default_week_start', self::WEEK_START_MONDAY));
588  $this->setDefaultDateFormat($this->storage->get('default_date_format', self::DATE_FORMAT_DMY));
589  $this->setDefaultTimeFormat($this->storage->get('default_time_format', self::TIME_FORMAT_24));
590  $this->setEnableGroupMilestones($this->storage->get('enable_grp_milestones'));
591  $this->setDefaultDayStart($this->storage->get('default_day_start', self::DEFAULT_DAY_START));
592  $this->setDefaultDayEnd($this->storage->get('default_day_end', self::DEFAULT_DAY_END));
593  $this->useCache($this->storage->get('cache_enabled'), $this->cache_enabled);
594  $this->setCacheMinutes($this->storage->get('cache_minutes', self::DEFAULT_CACHE_MINUTES));
595  $this->enableSynchronisationCache($this->storage->get('sync_cache_enabled'), $this->isSynchronisationCacheEnabled());
596  $this->setSynchronisationCacheMinutes($this->storage->get('sync_cache_minutes', self::DEFAULT_SYNC_CACHE_MINUTES));
597  $this->enableNotification($this->storage->get('notification', $this->isNotificationEnabled()));
598  $this->enableConsultationHours($this->storage->get('consultation_hours', $this->areConsultationHoursEnabled()));
599  $this->enableCGRegistration($this->storage->get('cg_registration', $this->isCGRegistrationEnabled()));
600  $this->enableCourseCalendar($this->storage->get('course_cal', $this->isCourseCalendarEnabled()));
601  $this->enableGroupCalendar($this->storage->get('group_cal', $this->isGroupCalendarEnabled()));
602  $this->enableUserNotification($this->storage->get('notification_user', $this->isUserNotificationEnabled()));
603  $this->enableWebCalSync($this->storage->get('webcal_sync', $this->isWebCalSyncEnabled()));
604  $this->setWebCalSyncHours($this->storage->get('webcal_sync_hours', $this->getWebCalSyncHours()));
605  $this->setShowWeeks($this->storage->get('show_weeks', $this->getShowWeeks()));
606  $this->enableBatchFileDownloads($this->storage->get('batch_files', $this->isBatchFileDownloadsEnabled()));
607  }
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
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 616 of file class.ilCalendarSettings.php.

References $query, and $row.

Referenced by __construct().

617  {
618  $query = "SELECT ref_id FROM object_reference obr " .
619  "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
620  "WHERE type = 'cals'";
621 
622  $set = $this->db->query($query);
623  $row = $this->db->fetchAssoc($set);
624 
625  $this->cal_settings_id = $row["ref_id"];
626  return true;
627  }
$query
$row
+ Here is the caller graph for this function:

◆ save()

ilCalendarSettings::save ( )

save

public

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

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

551  {
552  $this->storage->set('enabled', (int) $this->isEnabled());
553  $this->storage->set('default_timezone', $this->getDefaultTimeZone());
554  $this->storage->set('default_week_start', $this->getDefaultWeekStart());
555  $this->storage->set('default_date_format', $this->getDefaultDateFormat());
556  $this->storage->set('default_time_format', $this->getDefaultTimeFormat());
557  $this->storage->set('enable_grp_milestones', (int) $this->getEnableGroupMilestones());
558  $this->storage->set('default_day_start', (int) $this->getDefaultDayStart());
559  $this->storage->set('default_day_end', (int) $this->getDefaultDayEnd());
560  $this->storage->set('cache_minutes', (int) $this->getCacheMinutes());
561  $this->storage->set('sync_cache_enabled', (int) $this->isSynchronisationCacheEnabled());
562  $this->storage->set('sync_cache_minutes', (int) $this->getSynchronisationCacheMinutes());
563  $this->storage->set('cache_enabled', (int) $this->isCacheUsed());
564  $this->storage->set('notification', (int) $this->isNotificationEnabled());
565  $this->storage->set('consultation_hours', (int) $this->areConsultationHoursEnabled());
566  $this->storage->set('cg_registration', (int) $this->isCGRegistrationEnabled());
567  $this->storage->set('course_cal', (int) $this->isCourseCalendarEnabled());
568  $this->storage->set('group_cal', (int) $this->isGroupCalendarEnabled());
569  $this->storage->set('notification_user', (int) $this->isUserNotificationEnabled());
570  $this->storage->set('webcal_sync', (int) $this->isWebCalSyncEnabled());
571  $this->storage->set('webcal_sync_hours', (int) $this->getWebCalSyncHours());
572  $this->storage->set('show_weeks', (int) $this->getShowWeeks());
573  $this->storage->set('batch_files', (int) $this->isBatchFileDownloadsEnabled());
574  }
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 181 of file class.ilCalendarSettings.php.

Referenced by read().

182  {
183  $this->cache_minutes = $a_min;
184  }
+ 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 266 of file class.ilCalendarSettings.php.

Referenced by read().

267  {
268  $this->date_format = $a_format;
269  }
+ 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 338 of file class.ilCalendarSettings.php.

Referenced by read().

339  {
340  $this->day_end = $a_end;
341  }
+ 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 319 of file class.ilCalendarSettings.php.

Referenced by read().

320  {
321  $this->day_start = $a_start;
322  }
+ 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 289 of file class.ilCalendarSettings.php.

Referenced by read().

290  {
291  $this->time_format = $a_format;
292  }
+ Here is the caller graph for this function:

◆ setDefaultTimeZone()

ilCalendarSettings::setDefaultTimeZone (   $a_zone)

set default timezone

public

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

Referenced by read().

245  {
246  $this->timezone = $a_zone;
247  }
+ Here is the caller graph for this function:

◆ setDefaultWeekStart()

ilCalendarSettings::setDefaultWeekStart (   $a_start)

set week start

public

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

Referenced by read().

224  {
225  $this->week_start = $a_start;
226  }
+ Here is the caller graph for this function:

◆ setEnabled()

ilCalendarSettings::setEnabled (   $a_enabled)

set enabled

public

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

Referenced by read().

202  {
203  $this->enabled = $a_enabled;
204  }
+ 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 379 of file class.ilCalendarSettings.php.

Referenced by read().

380  {
381  $this->enablegroupmilestones = $a_enablegroupmilestones;
382  }
+ Here is the caller graph for this function:

◆ setShowWeeks()

ilCalendarSettings::setShowWeeks (   $a_val)

Set show weeks.

Parameters
bool$a_valshow weeks

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

Referenced by read().

521  {
522  $this->show_weeks = $a_val;
523  }
+ 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 417 of file class.ilCalendarSettings.php.

Referenced by read().

418  {
419  $this->sync_cache_minutes = $a_min;
420  }
+ Here is the caller graph for this function:

◆ setWebCalSyncHours()

ilCalendarSettings::setWebCalSyncHours (   $a_hours)

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

Referenced by read().

506  {
507  $this->webcal_sync_hours = $a_hours;
508  }
+ Here is the caller graph for this function:

◆ useCache()

ilCalendarSettings::useCache (   $a_status)

Enable cache.

Parameters
object$a_status
Returns

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

Referenced by read().

163  {
164  $this->cache_enabled = $a_status;
165  }
+ Here is the caller graph for this function:

Field Documentation

◆ $batch_file_downloads

ilCalendarSettings::$batch_file_downloads = false
private

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

Referenced by isBatchFileDownloadsEnabled().

◆ $cache_enabled

ilCalendarSettings::$cache_enabled = true
private

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

Referenced by isCacheUsed(), and read().

◆ $cache_minutes

ilCalendarSettings::$cache_minutes = 1
private

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

Referenced by getCacheMinutes().

◆ $cal_settings_id

ilCalendarSettings::$cal_settings_id = 0
private

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

Referenced by getCalendarSettingsId().

◆ $cg_registration

ilCalendarSettings::$cg_registration = false
private

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

Referenced by isCGRegistrationEnabled().

◆ $consultation_hours

ilCalendarSettings::$consultation_hours = false
private

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

Referenced by areConsultationHoursEnabled().

◆ $course_cal_enabled

ilCalendarSettings::$course_cal_enabled = true
private

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

Referenced by isCourseCalendarEnabled().

◆ $day_end

ilCalendarSettings::$day_end = null
private

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

Referenced by getDefaultDayEnd().

◆ $day_start

ilCalendarSettings::$day_start = null
private

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

Referenced by getDefaultDayStart().

◆ $db

ilCalendarSettings::$db = null
private

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

◆ $enabled

ilCalendarSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $group_cal_enabled

ilCalendarSettings::$group_cal_enabled = true
private

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

Referenced by isGroupCalendarEnabled().

◆ $instance

ilCalendarSettings::$instance = null
staticprivate

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

◆ $notification

ilCalendarSettings::$notification = false
private

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

Referenced by isNotificationEnabled().

◆ $notification_user

ilCalendarSettings::$notification_user = false
private

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

Referenced by isUserNotificationEnabled().

◆ $show_weeks

ilCalendarSettings::$show_weeks = false
private

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

Referenced by getShowWeeks().

◆ $storage

ilCalendarSettings::$storage = null
private

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

◆ $sync_cache_enabled

ilCalendarSettings::$sync_cache_enabled = true
private

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

Referenced by isSynchronisationCacheEnabled().

◆ $sync_cache_minutes

ilCalendarSettings::$sync_cache_minutes = 10
private

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

Referenced by getSynchronisationCacheMinutes().

◆ $time_format

ilCalendarSettings::$time_format = null
private

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

Referenced by getDefaultTimeFormat().

◆ $timezone

ilCalendarSettings::$timezone = null
private

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

Referenced by getDefaultTimeZone().

◆ $webcal_sync

ilCalendarSettings::$webcal_sync = false
private

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

Referenced by isWebCalSyncEnabled().

◆ $webcal_sync_hours

ilCalendarSettings::$webcal_sync_hours = 2
private

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

Referenced by getWebCalSyncHours().

◆ $week_start

ilCalendarSettings::$week_start = 0
private

Definition at line 61 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.

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

◆ 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

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