You are here

purge.install in Purge 8.3

Same filename and directory in other branches
  1. 6 purge.install
  2. 7.2 purge.install
  3. 7 purge.install

Installation file for the purge module.

File

purge.install
View source
<?php

/**
 * @file
 * Installation file for the purge module.
 */

/**
 * Implements hook_requirements().
 */
function purge_requirements($phase) {
  if ($phase !== 'runtime') {
    return [];
  }
  $checks = \Drupal::service('purge.diagnostics');
  return $checks
    ->toRequirementsArray($checks
    ->filterWarningAndErrors(), TRUE);
}

/**
 * Implements hook_uninstall().
 */
function purge_uninstall() {
  if (\Drupal::database()
    ->schema()
    ->tableExists('purge_queue')) {
    \Drupal::database()
      ->schema()
      ->dropTable('purge_queue');
  }
}

Functions

Namesort descending Description
purge_requirements Implements hook_requirements().
purge_uninstall Implements hook_uninstall().