forked from a64f7bb4-7358-4778-9fbe-3b882c34cc1d/v1
27 lines
535 B
PHP
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');
|
|
}
|
|
}
|