public function ScheduleAware::send in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/modules/sms_test_gateway/src/Plugin/SmsGateway/ScheduleAware.php \Drupal\sms_test_gateway\Plugin\SmsGateway\ScheduleAware::send()
- 2.1.x tests/modules/sms_test_gateway/src/Plugin/SmsGateway/ScheduleAware.php \Drupal\sms_test_gateway\Plugin\SmsGateway\ScheduleAware::send()
Sends an SMS.
Parameters
\Drupal\sms\Message\SmsMessageInterface $sms: The sms to be sent.
Return value
\Drupal\sms\Message\SmsMessageResultInterface The result of the sms messaging operation.
Overrides Memory::send
File
- tests/
modules/ sms_test_gateway/ src/ Plugin/ SmsGateway/ ScheduleAware.php, line 29
Class
- ScheduleAware
- Defines a gateway which is aware of scheduled send time.
Namespace
Drupal\sms_test_gateway\Plugin\SmsGatewayCode
public function send(SmsMessageInterface $sms) {
if ($sms instanceof SmsMessageEntityInterface) {
return parent::send($sms);
}
else {
throw new \Exception('Not a SMS message entity');
}
}