public function SmsMessage::addRecipient in SMS Framework 8
Same name in this branch
- 8 src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::addRecipient()
- 8 src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::addRecipient()
Same name and namespace in other branches
- 2.x src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::addRecipient()
- 2.1.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 171
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;
}