All Data Structures Functions Variables Pages
Static Public Member Functions | Static Public Attributes
MarketingListsUtil Class Reference

Static Public Member Functions

static resolveMarketingList ($resolveSubscribersForm)
 
static getContactsByResolveSubscribersFormAndCampaignAndOffsetAndPageSize ($resolveSubscribersForm, $campaign, $offset, $pageSize)
 
static getNumberOfContactPagesByResolveSubscribersFormAndCampaign ($resolveSubscribersForm, $campaign)
 
static getCountOfContactsByResolveSubscribersFormAndCampaign ($resolveSubscribersForm, $campaign)
 
static generateRandomNameForCampaignRetargetingList (Campaign $campaign)
 
static addNewSubscribersToMarketingList ($marketingListId, &$contacts, $scenario=null)
 

Static Public Attributes

static $pageSize = 50
 

Detailed Description

Helper class for working with marketing list.

Definition at line 40 of file MarketingListsUtil.php.

Member Function Documentation

static resolveMarketingList (   $resolveSubscribersForm)
static

Resolve marketing list. Because we allow users to either select existing marketingList or enter name for new marketing list, we need to determine if we will use exisitng one or create new one.

Parameters
$resolveSubscribersForm
Returns
MarketingList
Exceptions
NotFoundException

Definition at line 56 of file MarketingListsUtil.php.

static getContactsByResolveSubscribersFormAndCampaignAndOffsetAndPageSize (   $resolveSubscribersForm,
  $campaign,
  $offset,
  $pageSize 
)
static

Get contacts based on campaign and activity types

Parameters
$resolveSubscribersForm
$campaign
$offset
$pageSize
Returns
array

Definition at line 96 of file MarketingListsUtil.php.

static getNumberOfContactPagesByResolveSubscribersFormAndCampaign (   $resolveSubscribersForm,
  $campaign 
)
static

Get number of pages

Parameters
$resolveSubscribersForm
$campaign
Returns
float

Definition at line 113 of file MarketingListsUtil.php.

static getCountOfContactsByResolveSubscribersFormAndCampaign (   $resolveSubscribersForm,
  $campaign 
)
static

Get count of maximum items . Because in one iteration we get paginatet results for all four types, to find out how many pages of results we have, we need to find out maximum number of results of all types. Public for test purposes only

Parameters
$resolveSubscribersForm
$campaign
Returns
int

Definition at line 129 of file MarketingListsUtil.php.

static generateRandomNameForCampaignRetargetingList ( Campaign  $campaign)
static

Generate name for new marketing list based on $campaign that user is retargeting

Parameters
Campaign$campaign
Returns
string

Definition at line 172 of file MarketingListsUtil.php.

static addNewSubscribersToMarketingList (   $marketingListId,
$contacts,
  $scenario = null 
)
static

Add new subscribers to marketing list

Parameters
$marketingListId
array$contacts
null$scenario
Returns
array
Exceptions
NotFoundException

Definition at line 186 of file MarketingListsUtil.php.


The documentation for this class was generated from the following file:
Generated on Sat Jan 25 2020 07:10:37