public function PhoneNumberProviderInterface::sendMessage in SMS Framework 8
Same name and namespace in other branches
- 2.x src/Provider/PhoneNumberProviderInterface.php \Drupal\sms\Provider\PhoneNumberProviderInterface::sendMessage()
- 2.1.x src/Provider/PhoneNumberProviderInterface.php \Drupal\sms\Provider\PhoneNumberProviderInterface::sendMessage()
Sends an SMS to an entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to send an SMS.
\Drupal\sms\Message\SmsMessageInterface $sms_message: The SMS message to send to the entity.
Return value
\Drupal\sms\Message\SmsMessageResultInterface|false The message result from the gateway.
Throws
\Drupal\sms\Exception\NoPhoneNumberException Thrown if entity does not have a phone number.
1 method overrides PhoneNumberProviderInterface::sendMessage()
- PhoneNumberProvider::sendMessage in src/
Provider/ PhoneNumberProvider.php - Sends an SMS to an entity.
File
- src/
Provider/ PhoneNumberProviderInterface.php, line 41
Class
- PhoneNumberProviderInterface
- Interface for phone number provider.
Namespace
Drupal\sms\ProviderCode
public function sendMessage(EntityInterface $entity, SmsMessageInterface $sms_message);