ProMailerSubscribers class

Copyright 2019 by Ryan Cramer

This is a commercial module, do not distribute.

HOOKS CALLED BEFORE AN EVENT

(these hooks can set $event->return to false to cancel an event)

HOOKS CALLED AFTER SUCCESS

BOUNCE-RELATED HOOKS

CONFIRMATION CODE-RELATED HOOKS

OTHER METHOD HOOKS


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?       Only hookable?    

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)
NoneNew subscriber added
ProMailerSubscribers::bounce($subscriber)
intRecord a bounce for an email address or a subscriber in a list 
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::confirmedEmail(string $email, ProMailerList $list, string $code)
NoneEmail 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)
NoneExport 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::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::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()
None 
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)
NoneSave 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)
NoneSubscriber saved
ProMailerSubscribers::table()
None 
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)
NoneSubscriber removed from list
ProMailerSubscribers::unsubscribedEmail(string $email)
NoneEmail address removed from ALL lists
ProMailerSubscribers::unsubscribedPage(Page $subscriber, ProMailerList $list)
NonePage-based subscriber unsubscribed from pages-type list
ProMailerSubscribers::upgrade($fromVersion, $toVersion)
None 

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.251