You are here

function mailgun_uninstall in Mailgun 8

Same name and namespace in other branches
  1. 7 mailgun.install \mailgun_uninstall()

Implements hook_install().

File

./mailgun.install, line 29
Contains install/uninstall stuff.

Code

function mailgun_uninstall() {
  $config = \Drupal::configFactory()
    ->getEditable('system.mail');
  $mail_plugins = $config
    ->get('interface');
  if (!in_array('mailgun', array_keys($mail_plugins))) {
    return;
  }
  unset($mail_plugins['mailgun']);
  $config
    ->set('interface', $mail_plugins)
    ->save();
}