function activity_send_email_uninstall in Open Social 8.3
Same name and namespace in other branches
- 8.9 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8.2 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8.4 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8.5 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8.6 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8.7 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 8.8 modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 10.3.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 10.0.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 10.1.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
- 10.2.x modules/custom/activity_send/modules/activity_send_email/activity_send_email.install \activity_send_email_uninstall()
Implements hook_uninstall().
Removes keys from the State API.
File
- modules/
custom/ activity_send/ modules/ activity_send_email/ activity_send_email.install, line 15 - Install, update and uninstall functions for the activity_send_email module.
Code
function activity_send_email_uninstall() {
// Get plugins and their intervals.
$emailfrequencymanager = \Drupal::service('plugin.manager.emailfrequency');
$plugins = $emailfrequencymanager
->getDefinitions();
// Remove all cron last run times from the State API.
foreach ($plugins as $frequency) {
\Drupal::state()
->delete('digest.' . $frequency['id'] . '.last_run');
}
}