Webylon 3.1 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • BatchProcess
  • BatchProcess_Controller
  • BouncedList
  • Newsletter
  • Newsletter_Email
  • Newsletter_Recipient
  • Newsletter_SentRecipient
  • NewsletterAdmin
  • NewsletterEmailProcess
  • NewsletterList
  • NewsletterRole
  • NewsletterType
  • ProgressBar
  • RecipientExportField
  • RecipientImportField
  • RecipientImportField_Cell
  • SubscribeForm
  • SubscribeForm_Controller
  • Unsubscribe_Controller
  • Unsubscribe_MailingListForm
  • UnsubscribedList
  • UnsubscribeRecord
 1 <?php
 2 
 3 /**
 4  * Simple form field shown when the NewsletterAdmin first loads.
 5  * 
 6  * @package newsletter
 7  */
 8 class NewsletterList extends FormField {
 9     function __construct($name, $mailtype, $status = "Draft") {
10         if(is_object($mailtype)) $this->mailType = $mailtype;
11         else $this->mailType = DataObject::get_by_id('NewsletterType',$mailtype);
12         $this->status = $status;
13         parent::__construct(null);
14     }
15     
16     function FieldHolder() {
17         return $this->renderWith("NewsletterList");
18     }
19     
20     
21     function setMailType($mailtype) {
22         $this->mailType = $mailtype;
23     }
24     
25     function setController($controller) {
26         $this->controller = $controller;
27     }
28     /* No longer used
29     function Newsletters() {
30         return DataObject::get( 'Newsletter', "`ParentID`='{$this->mailType->ID}' AND `Status`='{$this->status}'" );   
31     }
32     */
33     
34     function DraftNewsletters() {
35         return $this->mailType->DraftNewsletters();
36     }
37     
38     function SentNewsletters() {
39         return $this->mailType->SentNewsletters();
40     }
41     
42     function Status() {
43         return $this->status;
44     }
45     function mailTypeID() {
46         return $this->mailType->ID;
47     }
48 }
49 
50 ?>
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.1 API Docs API documentation generated by ApiGen 2.8.0