You are here

function apdqc_module_implements_alter in Asynchronous Prefetch Database Query Cache 7

Implements hook_module_implements_alter().

File

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

Code

function apdqc_module_implements_alter(&$implementations, $hook) {

  // Move apdqc to the top.
  if ($hook === 'theme_registry_alter' && array_key_exists('apdqc', $implementations)) {
    $item = array(
      'apdqc' => $implementations['apdqc'],
    );
    unset($implementations['apdqc']);
    $implementations = array_merge($item, $implementations);
  }

  // Put apdqc_before_entity_info_alter() at the top and
  // apdqc_after_entity_info_alter() at the end.
  if ($hook === 'entity_info_alter') {
    $item = array(
      'apdqc_before' => FALSE,
    );
    $implementations = array_merge($item, $implementations);
    $implementations['apdqc_after'] = FALSE;
  }

  // Remove dblog, add apdqc_dblog.
  if ($hook === 'watchdog' && isset($implementations['dblog'])) {
    unset($implementations['dblog']);
    $implementations['_apdqc_dblog'] = FALSE;
  }
}