Validator
in package
Class Validator
Table of Contents
Constants
- EVENT_CHECK_SENDABLE = 'civi.flexmailer.checkSendable'
Properties
- $dispatcher : EventDispatcherInterface
Methods
- __construct() : mixed
- FlexMailer constructor.
- createAndRun() : array<string|int, mixed>
- run() : array<string|int, mixed>
Constants
EVENT_CHECK_SENDABLE
public
mixed
EVENT_CHECK_SENDABLE
= 'civi.flexmailer.checkSendable'
Properties
$dispatcher
private
EventDispatcherInterface
$dispatcher
Methods
__construct()
FlexMailer constructor.
public
__construct([EventDispatcherInterface $dispatcher = NULL ]) : mixed
Parameters
- $dispatcher : EventDispatcherInterface = NULL
createAndRun()
public
static createAndRun(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
The mailing which may or may not be sendable.
Return values
array<string|int, mixed> —List of error messages.
run()
public
run(array<string|int, mixed> $context) : array<string|int, mixed>
Parameters
- $context : array<string|int, mixed>
-
An array which must define options:
- mailing: \CRM_Mailing_BAO_Mailing
- attachments: array
Return values
array<string|int, mixed> —List of error messages. Ex: array('subject' => 'The Subject field is blank'). Example keys: 'subject', 'name', 'from_name', 'from_email', 'body', 'body_html:unsubscribeUrl'.