You are here

function simplenews_scheduler_node_delete in Simplenews Scheduler 2.0.x

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

Implements hook_node_delete().

File

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

Code

function simplenews_scheduler_node_delete(NodeInterface $node) {
  \Drupal::database()
    ->delete('simplenews_scheduler')
    ->condition('nid', $node
    ->id())
    ->execute();
  \Drupal::database()
    ->delete('simplenews_scheduler_editions')
    ->condition('eid', $node
    ->id())
    ->execute();
}