You are here

function elysia_cron_ctools_export_load_all in Elysia Cron 6.2

Same name and namespace in other branches
  1. 6 elysia_cron.ctools.inc \elysia_cron_ctools_export_load_all()
  2. 7.2 elysia_cron.ctools.inc \elysia_cron_ctools_export_load_all()
  3. 7 elysia_cron.ctools.inc \elysia_cron_ctools_export_load_all()

Ctools load all callback Ctools does not support override of PARTIAL record, this is an elysia cron specific replacement to support it

1 call to elysia_cron_ctools_export_load_all()
elysia_cron_ctools_to_hook_code in ./elysia_cron.ctools.inc
Ctools export to hook code callback Original "to hook code" callback doesn't support the replacement of "load/load all" callback (it simply ignores them, even if defined and supported elsewhere) This code is equal to the…
1 string reference to 'elysia_cron_ctools_export_load_all'
elysia_cron_schema in ./elysia_cron.install

File

./elysia_cron.ctools.inc, line 55

Code

function elysia_cron_ctools_export_load_all() {
  $schema = ctools_export_get_schema('elysia_cron');
  if (empty($schema)) {
    return array();
  }
  $export = $schema['export'];
  if (EC_DRUPAL_VERSION >= 7) {
    $objects = db_query("select " . implode(", ", $GLOBALS['_ec_columns']) . " from {elysia_cron}")
      ->fetchAll();
  }
  else {
    $objects = array();
    $rs = db_query("select " . implode(", ", $GLOBALS['_ec_columns']) . " from {elysia_cron}");
    while ($o = db_fetch_object($rs)) {
      $objects[] = $o;
    }
  }
  $default_objects = _ctools_export_get_defaults('elysia_cron', $export);
  $result = array();
  foreach ($objects as $object) {
    $key = $object->{$export['key']};
    if (isset($default_objects[$key])) {
      $result[$key] = _elysia_cron_ctools_export_load_object_db_and_code($object, $default_objects[$key], $export);
      unset($default_objects[$key]);
    }
    else {
      $result[$key] = _elysia_cron_ctools_export_load_object_db($object, $export);
    }
  }
  foreach ($default_objects as $key => $object) {
    $result[$key] = _elysia_cron_ctools_export_load_object_code($object, $export);
  }
  return $result;
}