You are here

advagg_bundler.install in Advanced CSS/JS Aggregation 7

Handles AdvAgg Bundler installation and upgrade tasks.

File

advagg_bundler/advagg_bundler.install
View source
<?php

/**
 * @file
 * Handles AdvAgg Bundler installation and upgrade tasks.
 */

/**
 * Implements hook_enable().
 */
function advagg_bundler_enable() {

  // Flush advagg caches.
  $cache_tables = advagg_flush_caches();
  foreach ($cache_tables as $table) {
    cache_clear_all('*', $table, TRUE);
  }
}

/**
 * Implements hook_disable().
 */
function advagg_bundler_disable() {

  // Flush advagg caches.
  $cache_tables = advagg_flush_caches();
  foreach ($cache_tables as $table) {
    cache_clear_all('*', $table, TRUE);
  }
}

/**
 * Implements hook_uninstall().
 */
function advagg_bundler_uninstall() {

  // Remove variables.
  variable_del('advagg_bundler_outdated');
  variable_del('advagg_bundler_max_css');
  variable_del('advagg_bundler_max_js');
  variable_del('advagg_bundler_active');
}

/**
 * Implements hook_requirements().
 */
function advagg_bundler_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break at install time
  $t = get_t();
  if ($phase == 'runtime') {
  }
  return $requirements;
}