interface PhoneNumberProviderInterface in SMS Framework 2.x
Same name and namespace in other branches
- 8 src/Provider/PhoneNumberProviderInterface.php \Drupal\sms\Provider\PhoneNumberProviderInterface
- 2.1.x src/Provider/PhoneNumberProviderInterface.php \Drupal\sms\Provider\PhoneNumberProviderInterface
Interface for phone number provider.
Hierarchy
- interface \Drupal\sms\Provider\PhoneNumberProviderInterface
Expanded class hierarchy of PhoneNumberProviderInterface
All classes that implement PhoneNumberProviderInterface
File
- src/
Provider/ PhoneNumberProviderInterface.php, line 13
Namespace
Drupal\sms\ProviderView source
interface PhoneNumberProviderInterface {
/**
* Gets phone numbers for an entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* An entity to get phone numbers.
* @param bool|null $verified
* Whether the returned phone numbers must be verified, or NULL to get all
* phone numbers regardless of status.
*
* @return string[]
* An array of phone numbers.
*/
public function getPhoneNumbers(EntityInterface $entity, $verified = TRUE);
/**
* Sends an SMS to an entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to send an SMS.
* @param \Drupal\sms\Message\SmsMessageInterface $sms_message
* The SMS message to send to the entity.
*
* @return \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.
*/
public function sendMessage(EntityInterface $entity, SmsMessageInterface $sms_message);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PhoneNumberProviderInterface:: |
public | function | Gets phone numbers for an entity. | 1 |
PhoneNumberProviderInterface:: |
public | function | Sends an SMS to an entity. | 1 |