You are here

public function NewsletterNewsletterController::deleteDraft in Newsletter 7

File

includes/newsletter.newsletter.controller.inc, line 93
Controller class definition file for newsletter_newsletter entity.

Class

NewsletterNewsletterController
Newsletter Newsletter Controller

Code

public function deleteDraft($nnid) {
  $drafts = variable_get('newsletter_custom_drafts', array());
  if (!empty($drafts[$nnid])) {
    unset($drafts[$nnid]);
    variable_set('newsletter_custom_drafts', $drafts);

    // Also delete from database.
    return $this
      ->delete($nnid);
  }
}