You are here

public function NewsletterNewsletterController::create in Newsletter 7

File

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

Class

NewsletterNewsletterController
Newsletter Newsletter Controller

Code

public function create($title, $ntid, $custom = FALSE) {
  $newsletter = new stdClass();
  $newsletter->title = $title;
  $newsletter->ntid = $ntid;
  $newsletter->custom = $custom ? 1 : 0;
  $newsletter->send_id = 0;
  $this
    ->saveNew($newsletter);
  return $newsletter;
}