You are here

function sendinblue_uninstall in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 sendinblue.install \sendinblue_uninstall()
  2. 7.2 sendinblue.install \sendinblue_uninstall()
  3. 7 sendinblue.install \sendinblue_uninstall()

Implements hook_uninstall().

File

./sendinblue.install, line 54
Install, update and uninstall functions for the sendinblue module.

Code

function sendinblue_uninstall() {
  \Drupal::getContainer()
    ->get('config.factory')
    ->getEditable(SendinblueManager::CONFIG_SETTINGS)
    ->delete();
  \Drupal::getContainer()
    ->get('config.factory')
    ->getEditable(SendinblueManager::CONFIG_SETTINGS_SEND_EMAIL)
    ->delete();
  \Drupal::getContainer()
    ->get('config.factory')
    ->getEditable(SendinblueManager::CONFIG_SETTINGS_REGISTERING_USER)
    ->delete();
  $config = \Drupal::getContainer()
    ->get('config.factory')
    ->getEditable('system.mail');
  $config
    ->set('interface.default', 'php_mail')
    ->save();
}