public function NewsletterListController::delete in Newsletter 7
File
- includes/
newsletter.list.controller.inc, line 60 - Controller class definition file for newsletter_list entity.
Class
- NewsletterListController
- Newsletter List Controller
Code
public function delete($nlid) {
$list = newsletter_list_load($nlid);
$deleted = db_delete('newsletter_list')
->condition('nlid', $nlid)
->execute();
module_invoke_all('entity_delete', $list, 'newsletter_list');
field_attach_delete('newsletter_list', $list);
cache_clear_all();
$this
->resetCache();
return $deleted ? TRUE : FALSE;
}