You are here

public function NewsletterTemplateController::delete in Newsletter 7

File

includes/newsletter.template.controller.inc, line 62
Controller class definition file for newsletter_template entity.

Class

NewsletterTemplateController
Newsletter Template Controller

Code

public function delete($ntid) {
  $template = newsletter_template_load($ntid);
  db_delete('newsletter_template')
    ->condition('ntid', $ntid)
    ->execute();
  module_invoke_all('entity_delete', $template, 'newsletter_template');
  field_attach_delete('newsletter_template', $template);
  cache_clear_all();
  $this
    ->resetCache();
  return TRUE;
}