Documentation

FlexMailer

Class FlexMailer

Tags
link
http://symfony.com/doc/current/components/event_dispatcher.html

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_PREPARE

public mixed WEIGHT_PREPARE = 1000

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.

getEventTypes()

public static getEventTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array(string $event => string $class).

validate()

public validate() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of error messages


        
On this page

Search results