ProMailerSubscribers class

Located in file /site/modules/ProMailer/ProMailerSubscribers.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ProMailerSubscribers class also inherits all the methods and properties of: ProMailerTypeManager and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
ProMailerSubscribers::add(string $email, $list)
ProMailerSubscriber bool intAdd a subscriber to a subscribers list 
ProMailerSubscribers::addReady(string $email, ProMailerList $list, bool $confirmed, array $data)
boolReady to add new subscriber
ProMailerSubscribers::added(ProMailerSubscriber $subscriber)
(nothing)New subscriber added
ProMailerSubscribers::bounce($subscriber)
intRecord a bounce for an email address or a subscriber in a list 
ProMailerSubscribers::bounceEmail($email)
int
ProMailerSubscribers::bouncePage(Page $page, ProMailerList $list)
int
ProMailerSubscribers::bounceSubscriber(ProMailerSubscriber $subscriber, ProMailerList $list)
int
ProMailerSubscribers::confirmEmail(string $email, $list, string $code)
boolConfirm a subscriber as opt-in for a list 
ProMailerSubscribers::confirmEmailReady(string $email, ProMailerList $list, string $code)
boolReady to confirm an email
ProMailerSubscribers::confirmUrl(ProMailerSubscriber $subscriber, ProMailerList $list, Page $page)
string
ProMailerSubscribers::confirmedEmail(string $email, ProMailerList $list, string $code)
(nothing)Email confirmed
ProMailerSubscribers::copyAll(ProMailerList $list1, ProMailerList $list2)
arrayCopy all subscribers from list1 into list2 
ProMailerSubscribers::count()
intReturn total count of subscribers for given list 
ProMailerSubscribers::exportCSV($listId)
(nothing)Export subscribers to CSV download 
ProMailerSubscribers::find()
ProMailerSubscribersArray intGet current pagination (limit=100) of subscribers for given list 
ProMailerSubscribers::get($id)
ProMailerSubscriber boolGet a subscriber by email or ID 
ProMailerSubscribers::getAllowedSorts()
arrayGet fields allowed for sorting of subscribers 
ProMailerSubscribers::getByEmail(string $email)
bool array ProMailerSubscriberGiven an email address return the subscriber or boolean false if not found 
ProMailerSubscribers::getById(int $id)
bool ProMailerSubscriberGet a subscriber by ID 
ProMailerSubscribers::getCode($subscriber)
stringGet the confirmation code for given subscriber array or Page 
ProMailerSubscribers::getConfirmUrl(ProMailerSubscriber $subscriber)
stringGet the URL needed to confirm a subscriber 
ProMailerSubscribers::getDefaultSort()
stringGet default sort for subscribers 
ProMailerSubscribers::getNext($list)
ProMailerSubscriber bool nullGet the next subscriber for the given list 
ProMailerSubscribers::getPageCode(Page $page)
string
ProMailerSubscribers::getPageEmailField($list)
stringGet name of field used for email address on subscriber pages 
ProMailerSubscribers::getPageTemplates($list)
arrayGet array of template names used by subscriber pages 
ProMailerSubscribers::getRandomCode()
string
ProMailerSubscribers::getSubscriberCode(ProMailerSubscriber $subscriber)
string
ProMailerSubscribers::getUnsubscribeUrl($subscriber)
stringGet the URL to unsubscribe a particular subscriber from their list 
ProMailerSubscribers::importCSV(string $csvFile, $list)
array boolImport subscribers from given CSV file 
ProMailerSubscribers::install()
(nothing) 
ProMailerSubscribers::pageSelector($list)
string arrayReturn selector for finding subscribers from given list 
ProMailerSubscribers::pageToSubscriber(Page $page, $list)
ProMailerSubscriberConvert Page to a subscriber array 
ProMailerSubscribers::removeUnconfirmed()
intRemove subscribers that haven’t been confirmed for given number of days 
ProMailerSubscribers::save(ProMailerSubscriber $subscriber)
boolSave/update the given subscriber 
ProMailerSubscribers::saveLog(string $str)
(nothing)Save entry to subscribers log 
ProMailerSubscribers::saveLogDisabled()
boolDisable or enable logging or return current state if given no argumenets 
ProMailerSubscribers::saveReady(ProMailerSubscriber $subscriber, array $properties)
boolSubscriber ready to save
ProMailerSubscribers::saved(ProMailerSubscriber $subscriber, array $properties)
(nothing)Subscriber saved
ProMailerSubscribers::table()
stringGet the DB table name used by this type 
ProMailerSubscribers::unsubscribe($subscriber, $list)
boolRemove a subscriber from a list 
ProMailerSubscribers::unsubscribeAllFromList(ProMailerList $list)
intRemove all subscribers from a list
ProMailerSubscribers::unsubscribed(ProMailerSubscriber $subscriber, ProMailerList $list)
(nothing)Subscriber removed from list
ProMailerSubscribers::unsubscribedEmail(string $email)
(nothing)Email address removed from ALL lists
ProMailerSubscribers::unsubscribedPage(Page $subscriber, ProMailerList $list)
(nothing)Page-based subscriber unsubscribed from pages-type list
ProMailerSubscribers::upgrade($fromVersion, $toVersion)
(nothing) 

Additional methods and properties

In addition to the methods and properties above, ProMailerSubscribers also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #553
    In the 553rd issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, introduce a new third party module called Text Synthesis, and more. Read on!
    Weekly.pw / 14 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK