public function SmsMessage::addRecipient in SMS Framework 2.1.x
Same name in this branch
- 2.1.x src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::addRecipient()
- 2.1.x src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::addRecipient()
Same name and namespace in other branches
- 8 src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::addRecipient()
- 2.x src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::addRecipient()
Adds a single recipient to the SMS message.
Parameters
string $recipient: The recipient to add.
Return value
$this The called SMS message object.
Overrides SmsMessageInterface::addRecipient
1 call to SmsMessage::addRecipient()
- SmsMessage::addRecipients in src/
Message/ SmsMessage.php - Adds multiple recipients to the SMS message.
File
- src/
Message/ SmsMessage.php, line 173
Class
- SmsMessage
- Basic implementation of an SMS message.
Namespace
Drupal\sms\MessageCode
public function addRecipient($recipient) {
if (!in_array($recipient, $this->recipients)) {
$this->recipients[] = $recipient;
}
return $this;
}