You are here

function mandrill_uninstall in Mandrill 8

Same name and namespace in other branches
  1. 6 mandrill.install \mandrill_uninstall()
  2. 7.2 mandrill.install \mandrill_uninstall()
  3. 7 mandrill.install \mandrill_uninstall()

Implements hook_uninstall().

File

./mandrill.install, line 22
Install, update, and uninstall functions for the mandrill module.

Code

function mandrill_uninstall() {

  // Delete other variables:
  $config = \Drupal::service('config.factory')
    ->getEditable('mandrill.settings');
  $config
    ->clear('mandrill_analytics_campaign')
    ->save();
  $config
    ->clear('mandrill_analytics_domains')
    ->save();
  $config
    ->clear('mandrill_api_key')
    ->save();
  $config
    ->clear('mandrill_filter_format')
    ->save();
  $config
    ->clear('mandrill_from_email')
    ->save();
  $config
    ->clear('mandrill_from_name')
    ->save();
  $config
    ->clear('mandrill_mail_key_blacklist')
    ->save();
  $config
    ->clear('mandrill_test_address')
    ->save();
  $config
    ->clear('mandrill_test_body')
    ->save();
  $config
    ->clear('mandrill_track_clicks')
    ->save();
  $config
    ->clear('mandrill_track_opens')
    ->save();
  $config
    ->clear('mandrill_url_strip_qs')
    ->save();
  $config
    ->clear('mandrill_process_async')
    ->save();
  $queue = \Drupal::queue(MANDRILL_QUEUE);
  $queue
    ->deleteQueue();
}