public function MySmsEventSubscriber::mySmsMessagePostProcess in SMS Framework 8
Same name and namespace in other branches
- 2.x sms.api.php \MySmsEventSubscriber::mySmsMessagePostProcess()
- 2.1.x sms.api.php \MySmsEventSubscriber::mySmsMessagePostProcess()
An example event subscriber.
See also
\Drupal\sms\Event\SmsEvents::MESSAGE_POST_PROCESS
File
- ./
sms.api.php, line 76 - SMS Framework hooks.
Class
- MySmsEventSubscriber
- Event subscribers for SMS Framework.
Code
public function mySmsMessagePostProcess(\Drupal\sms\Event\SmsMessageEvent $event) {
$result = [];
foreach ($event
->getMessages() as $message) {
// Modify or chunk messages.
$result[] = $message;
}
$event
->setMessages($result);
}