You are here

function apdqc_panelizer_defaults_alter in Asynchronous Prefetch Database Query Cache 7

Implements hook_panelizer_defaults_alter().

File

./apdqc.module, line 631
Asynchronous Prefetch Database Query Cache module.

Code

function apdqc_panelizer_defaults_alter($items) {
  if (!function_exists('apdqc_run_prefetch_array') || !function_exists('apdqc_escape_string')) {
    return;
  }
  $table_keys_cache_prefetch = array();
  if (apdqc_get_bin_class_name('cache_field') === 'APDQCache') {
    foreach ($items as $values) {
      $table_keys_cache_prefetch['cache_field'][] = "field_info:bundle:{$values->panelizer_type}:{$values->panelizer_key}";
    }
  }
  apdqc_run_prefetch_array($table_keys_cache_prefetch);
}