You are here

public function Utility::faqAskDeleteFaqNotification in FAQ_Ask 8

Helper function to remove a notification from a question.

1 call to Utility::faqAskDeleteFaqNotification()
faq_ask_node_update in ./faq_ask.module
Implements hook_node_update().

File

src/Utility.php, line 195
Contains \Drupal\faq_ask\Utility.

Class

Utility
Contains static helper functions for FAQ module.

Namespace

Drupal\faq_ask

Code

public function faqAskDeleteFaqNotification($nid) {
  $deleted = \Drupal::database()
    ->delete('faq_ask_notify')
    ->condition('nid', $nid)
    ->execute();
  if ($deleted == 0) {
    drupal_set_message(t('Attempt to delete email notification failed.'), 'error');
  }
}