You are here

function _calendar_systems_load_dependencies in Calendar Systems 7.3

Same name and namespace in other branches
  1. 8 calendar_systems.helpers.inc \_calendar_systems_load_dependencies()
  2. 7 calendar_systems.helpers.inc \_calendar_systems_load_dependencies()
  3. 7.2 calendar_systems.helpers.inc \_calendar_systems_load_dependencies()

Internal helper to load calendar system's required dependencies.

1 call to _calendar_systems_load_dependencies()
calendar_systems_get_calendar_instance in ./calendar_systems.module
Gets an instance of the calendar object for the selected calendar system acording to the settings or the passed arguments

File

./calendar_systems.module, line 253
Contains Calendar Systems hook implementations and helpers.

Code

function _calendar_systems_load_dependencies() {

  // This static variable will not need to be reset during
  // the page request, so we're not using drupal_static() here.
  static $loaded = FALSE;
  if (!$loaded) {
    if (!module_exists('cml')) {
      module_load_include('class.inc.php', 'calendar_systems', 'calendar/lib/exception');
      module_load_include('class.inc.php', 'calendar_systems', 'calendar/lib/classesCore');
    }
    if (!class_exists('cmfcCalendar')) {
      module_load_include('class.inc.php', 'calendar_systems', 'calendar/calendar');
    }
    $loaded = TRUE;
  }
}