You are here

function gathercontent_uninstall in GatherContent 8

Same name and namespace in other branches
  1. 7.3 gathercontent.install \gathercontent_uninstall()
  2. 7 gathercontent.install \gathercontent_uninstall()
  3. 7.2 gathercontent.install \gathercontent_uninstall()

Implements hook_uninstall().

File

./gathercontent.install, line 49
Install and uninstall script for GatherContent module.

Code

function gathercontent_uninstall() {
  \Drupal::config('gc.settings')
    ->clear('gc_username')
    ->save();
  \Drupal::config('gc.settings')
    ->clear('gc_api_key')
    ->save();
  \Drupal::config('gc.settings')
    ->clear('gc_account')
    ->save();
  $database = \Drupal::database()
    ->schema();
  $database
    ->dropField('node', 'gc_mapping_id');
  $database
    ->dropField('node', 'gc_id');
  $database
    ->dropField('node', 'gc_import_status');
  $database
    ->dropField('file_managed', 'gc_id');
}