function db_maintenance_uninstall in DB Maintenance 8.2
Same name and namespace in other branches
- 6 db_maintenance.install \db_maintenance_uninstall()
- 7.2 db_maintenance.install \db_maintenance_uninstall()
- 7 db_maintenance.install \db_maintenance_uninstall()
Implements hook_uninstall().
File
- ./
db_maintenance.install, line 11 - Installation file for DB Maintenance.
Code
function db_maintenance_uninstall() {
// Delete individual configuration options.
\Drupal::config('db_maintenance.settings')
->clear('db_maintenance_cron_last')
->save();
\Drupal::config('db_maintenance.settings')
->clear('db_maintenance_cron_frequency')
->save();
\Drupal::config('db_maintenance.settings')
->clear('db_maintenance_log')
->save();
\Drupal::config('db_maintenance.settings')
->clear('db_maintenance_all_tables')
->save();
// Delete the list of tables for each DB.
$result = db_query("\n SELECT name FROM {variable}\n WHERE name LIKE 'db_maintenance_table_list_%'\n ");
foreach ($result as $row) {
// @FIXME
// // @FIXME
// // The correct configuration object could not be determined. You'll need to
// // rewrite this call manually.
// variable_del($row->name);
}
}