You are here

public static function SmsMessageProcessor::getSubscribedEvents in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/EventSubscriber/SmsMessageProcessor.php \Drupal\sms\EventSubscriber\SmsMessageProcessor::getSubscribedEvents()
  2. 2.1.x src/EventSubscriber/SmsMessageProcessor.php \Drupal\sms\EventSubscriber\SmsMessageProcessor::getSubscribedEvents()

File

src/EventSubscriber/SmsMessageProcessor.php, line 288

Class

SmsMessageProcessor
Handles messages before they are processed by queue(), send(), or incoming().

Namespace

Drupal\sms\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events[SmsEvents::MESSAGE_PRE_PROCESS][] = [
    'ensureIncomingSupport',
    1024,
  ];

  // Ensure reports for incoming messages.
  $events[SmsEvents::MESSAGE_PRE_PROCESS][] = [
    'ensureReportsPreprocess',
    1024,
  ];
  $events[SmsEvents::MESSAGE_PRE_PROCESS][] = [
    'ensureRecipients',
    1024,
  ];
  $events[SmsEvents::MESSAGE_PRE_PROCESS][] = [
    'ensureGateways',
    1024,
  ];
  $events[SmsEvents::MESSAGE_PRE_PROCESS][] = [
    'deliveryReportUrl',
  ];
  $events[SmsEvents::MESSAGE_PRE_PROCESS][] = [
    'chunkMaxRecipients',
    -1024,
  ];

  // Ensure reports for outgoing messages.
  $events[SmsEvents::MESSAGE_OUTGOING_POST_PROCESS][] = [
    'ensureReportsPostprocess',
    1024,
  ];
  return $events;
}