class SmsMessageEvent in SMS Framework 8
Same name and namespace in other branches
- 2.x src/Event/SmsMessageEvent.php \Drupal\sms\Event\SmsMessageEvent
- 2.1.x src/Event/SmsMessageEvent.php \Drupal\sms\Event\SmsMessageEvent
Event fired when SMS messages are processed.
This event can be used for both pre- and post- process events. See {@link \Drupal\sms\Event\SmsEvents} to see where this event is used.
Hierarchy
- class \Drupal\sms\Event\SmsMessageEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of SmsMessageEvent
See also
7 files declare their use of SmsMessageEvent
- DefaultSmsProvider.php in src/
Provider/ DefaultSmsProvider.php - Memory.php in tests/
modules/ sms_test_gateway/ src/ Plugin/ SmsGateway/ Memory.php - SmsEventSubscriber.php in modules/
sms_user/ src/ EventSubscriber/ SmsEventSubscriber.php - SmsIncomingEventInterface.php in src/
Plugin/ SmsGateway/ SmsIncomingEventInterface.php - SmsIncomingEventProcessorInterface.php in src/
Plugin/ SmsGateway/ SmsIncomingEventProcessorInterface.php
File
- src/
Event/ SmsMessageEvent.php, line 15
Namespace
Drupal\sms\EventView source
class SmsMessageEvent extends Event {
/**
* The SMS messages.
*
* @var \Drupal\sms\Message\SmsMessageInterface[]
*/
protected $messages;
/**
* Constructs the object.
*
* @param \Drupal\sms\Message\SmsMessageInterface[] $messages
* The SMS message.
*/
public function __construct(array $messages) {
$this
->setMessages($messages);
}
/**
* Get all messages on this event.
*
* @return \Drupal\sms\Message\SmsMessageInterface[]
* The messages on this event.
*/
public function getMessages() {
return $this->messages;
}
/**
* Set the messages on this event.
*
* @param \Drupal\sms\Message\SmsMessageInterface[] $messages
* The messages to set on this event.
*
* @return $this
* Returns this event for chaining.
*/
public function setMessages(array $messages) {
$this->messages = $messages;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SmsMessageEvent:: |
protected | property | The SMS messages. | |
SmsMessageEvent:: |
public | function | Get all messages on this event. | |
SmsMessageEvent:: |
public | function | Set the messages on this event. | |
SmsMessageEvent:: |
public | function | Constructs the object. |