You are here

public function Messaging_Message::delete in Messaging 7

Same name and namespace in other branches
  1. 6.4 includes/messaging_message.class.inc \Messaging_Message::delete()
  2. 6.3 classes/messaging_message.class.inc \Messaging_Message::delete()

Delete message from logs and store

3 calls to Messaging_Message::delete()
Messaging_Message::discard in ./messaging.message.inc
Discard message
Messaging_Message::dispatch_failed in ./messaging.message.inc
After the message has been processed with errors
Messaging_Message::dispatch_success in ./messaging.message.inc
After the message has been processed successfully

File

./messaging.message.inc, line 644
Drupal Messaging Framework - Message class file

Class

Messaging_Message
Message class

Code

public function delete() {
  if ($this->msid) {
    db_delete('messaging_message')
      ->condition('msid', $this->msid)
      ->execute();
    if (!empty($this->store) && ($store = messaging_store($this->store))) {
      $store
        ->message_delete($this);
    }
  }
  $this->deleted = TRUE;
}