\FACTFinder\DataCampaignIterator

A collection of all Campaign objects. Provides some convenience methods to query all campaigns at once.

Summary

Methods
Properties
Constants
__construct()
hasRedirect()
getRedirectUrl()
hasFeedback()
getFeedback()
hasPushedProducts()
getPushedProducts()
hasActiveQuestions()
getActiveQuestions()
hasAdvisorTree()
getAdvisorTree()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(array<mixed,\FACTFinder\Data\Campaign>  $campaigns) 

Parameters

array<mixed,\FACTFinder\Data\Campaign> $campaigns

hasRedirect()

hasRedirect() : boolean

Returns

boolean

getRedirectUrl()

getRedirectUrl() : string

Gets the first redirect URL if any campaign has a redirect. Returns null otherwise.

Returns

string

hasFeedback()

hasFeedback() : boolean

Returns

boolean

getFeedback()

getFeedback(string  $label) : string

Returns all feedback texts for the given label, concatenated with PHP_EOL.

Parameters

string $label

Returns

string

hasPushedProducts()

hasPushedProducts() : boolean

Returns

boolean

getPushedProducts()

getPushedProducts() : array<mixed,\FACTFinder\Data\Record>

Returns an array with the pushed products from all campaigns. Note that if a product shows up in multiple campaigns, it will be duplicated in the result of this function.

Returns

array<mixed,\FACTFinder\Data\Record>

hasActiveQuestions()

hasActiveQuestions() : boolean

Returns

boolean

getActiveQuestions()

getActiveQuestions() : array<mixed,\FACTFinder\Data\Record>

Returns an array with the active questions from all campaigns.

Returns

array<mixed,\FACTFinder\Data\Record>

hasAdvisorTree()

hasAdvisorTree() : boolean

Returns

boolean

getAdvisorTree()

getAdvisorTree() : array<mixed,\FACTFinder\Data\Record>

Returns an array with the root questions of the advisor trees from all campaigns.

Returns

array<mixed,\FACTFinder\Data\Record>