function htmlmail_uninstall in HTML Mail 8
Same name and namespace in other branches
- 8.3 htmlmail.install \htmlmail_uninstall()
- 8.2 htmlmail.install \htmlmail_uninstall()
- 5 htmlmail.install \htmlmail_uninstall()
- 6.2 htmlmail.install \htmlmail_uninstall()
- 6 htmlmail.install \htmlmail_uninstall()
- 7.2 htmlmail.install \htmlmail_uninstall()
- 7 htmlmail.install \htmlmail_uninstall()
Implements hook_uninstall().
File
- ./
htmlmail.install, line 31 - Installation for HTML Mail module.
Code
function htmlmail_uninstall() {
$config = \Drupal::configFactory()
->getEditable('system.mail');
$mail_plugins = $config
->get('interface');
if (!in_array('htmlmail', array_keys($mail_plugins))) {
return;
}
unset($mail_plugins['htmlmail']);
$config
->set('interface', $mail_plugins)
->save();
$config = \Drupal::configFactory()
->getEditable('mailsystem.settings');
$config
->set('defaults.sender', 'php_mail')
->set('defaults.formatter', 'php_mail')
->save();
\Drupal::configFactory()
->getEditable('htmlmail.settings')
->delete();
}