FlexMailer
in package
Class FlexMailer
Tags
Table of Contents
Constants
- EVENT_COMPOSE = 'civi.flexmailer.compose'
- EVENT_RUN = 'civi.flexmailer.run'
- EVENT_SEND = 'civi.flexmailer.send'
- EVENT_WALK = 'civi.flexmailer.walk'
- WEIGHT_ALTER = -1000
- WEIGHT_END = -2000
- WEIGHT_MAIN = 0
- WEIGHT_PREPARE = 1000
- WEIGHT_START = 2000
Properties
- $context : array<string|int, mixed>
- $dispatcher : EventDispatcherInterface
Methods
- __construct() : mixed
- FlexMailer constructor.
- createAndRun() : bool
- Create a new FlexMailer instance, using data available in the CiviMail runJobs().
- fireComposeBatch() : ComposeBatchEvent
- fireRun() : RunEvent
- fireSendBatch() : SendBatchEvent
- fireWalkBatches() : WalkBatchesEvent
- getEventTypes() : array<string|int, mixed>
- run() : bool
- validate() : array<string|int, mixed>
Constants
EVENT_COMPOSE
public
mixed
EVENT_COMPOSE
= 'civi.flexmailer.compose'
EVENT_RUN
public
mixed
EVENT_RUN
= 'civi.flexmailer.run'
EVENT_SEND
public
mixed
EVENT_SEND
= 'civi.flexmailer.send'
EVENT_WALK
public
mixed
EVENT_WALK
= 'civi.flexmailer.walk'
WEIGHT_ALTER
public
mixed
WEIGHT_ALTER
= -1000
WEIGHT_END
public
mixed
WEIGHT_END
= -2000
WEIGHT_MAIN
public
mixed
WEIGHT_MAIN
= 0
WEIGHT_PREPARE
public
mixed
WEIGHT_PREPARE
= 1000
WEIGHT_START
public
mixed
WEIGHT_START
= 2000
Properties
$context
public
array<string|int, mixed>
$context
An array which must define options: - mailing: \CRM_Mailing_BAO_Mailing - job: \CRM_Mailing_BAO_MailingJob - attachments: array - is_preview: bool
Additional options may be passed. To avoid naming conflicts, use prefixing.
$dispatcher
private
EventDispatcherInterface
$dispatcher
Methods
__construct()
FlexMailer constructor.
public
__construct([array<string|int, mixed> $context = [] ][, EventDispatcherInterface $dispatcher = NULL ]) : mixed
Parameters
- $context : array<string|int, mixed> = []
-
An array which must define options:
- mailing: \CRM_Mailing_BAO_Mailing
- job: \CRM_Mailing_BAO_MailingJob
- attachments: array
- $dispatcher : EventDispatcherInterface = NULL
createAndRun()
Create a new FlexMailer instance, using data available in the CiviMail runJobs().
public
static createAndRun(CRM_Mailing_BAO_MailingJob $job, object $deprecatedMessageMailer, array<string|int, mixed> $deprecatedTestParams) : bool
Parameters
- $job : CRM_Mailing_BAO_MailingJob
- $deprecatedMessageMailer : object
- $deprecatedTestParams : array<string|int, mixed>
Return values
bool —TRUE if delivery completed.
fireComposeBatch()
public
fireComposeBatch(array<string|int, FlexMailerTask> $tasks) : ComposeBatchEvent
Parameters
- $tasks : array<string|int, FlexMailerTask>
Return values
ComposeBatchEventfireRun()
public
fireRun() : RunEvent
Return values
RunEventfireSendBatch()
public
fireSendBatch(array<string|int, FlexMailerTask> $tasks) : SendBatchEvent
Parameters
- $tasks : array<string|int, FlexMailerTask>
Return values
SendBatchEventfireWalkBatches()
public
fireWalkBatches(callable $onVisitBatch) : WalkBatchesEvent
Parameters
- $onVisitBatch : callable
Return values
WalkBatchesEventgetEventTypes()
public
static getEventTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array(string $event => string $class).
run()
public
run() : bool
Tags
Return values
bool —TRUE if delivery completed.
validate()
public
validate() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of error messages