public function NewsletterSubscriberController::delete in Newsletter 7
File
- includes/
newsletter.subscriber.controller.inc, line 99 - Controller class definition file for newsletter_subscriber entity.
Class
- NewsletterSubscriberController
- Newsletter Subscriber Controller
Code
public function delete($nsid) {
$subscriber = newsletter_subscriber_load($nsid);
$deleted = db_delete('newsletter_subscriber')
->condition('nsid', $nsid)
->execute();
module_invoke_all('entity_delete', $subscriber, 'newsletter_subscriber');
field_attach_delete('newsletter_subscriber', $subscriber);
cache_clear_all();
$this
->resetCache();
return $deleted ? TRUE : FALSE;
}