You are here

function simplenews_scheduler_node_delete in Simplenews Scheduler 8

Same name and namespace in other branches
  1. 7 simplenews_scheduler.module \simplenews_scheduler_node_delete()
  2. 2.0.x simplenews_scheduler.module \simplenews_scheduler_node_delete()

Implements hook_node_delete().

File

./simplenews_scheduler.module, line 299
Simplenews Scheduler module allows a schedule to be set for sending (and resending) a Simplenews item.

Code

function simplenews_scheduler_node_delete(NodeInterface $node) {
  db_delete('simplenews_scheduler')
    ->condition('nid', $node
    ->id())
    ->execute();
  db_delete('simplenews_scheduler_editions')
    ->condition('eid', $node
    ->id())
    ->execute();
}