v1/web/modules/contrib/purge/purge.install

27 lines
535 B
PHP

<?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');
}
}