You are here

public function SmsMessage::getRecipients in SMS Framework 8

Same name in this branch
  1. 8 src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::getRecipients()
  2. 8 src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getRecipients()
Same name and namespace in other branches
  1. 2.x src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getRecipients()
  2. 2.1.x src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getRecipients()

Gets the list of recipients of this SMS message.

Return value

array The list of recipients of this SMS message.

Overrides SmsMessageInterface::getRecipients

1 call to SmsMessage::getRecipients()
SmsMessage::chunkByRecipients in src/Entity/SmsMessage.php
Split this SMS message into new messages by chunks of recipients.

File

src/Entity/SmsMessage.php, line 61

Class

SmsMessage
Defines the SMS message entity.

Namespace

Drupal\sms\Entity

Code

public function getRecipients() {
  $recipients = [];
  foreach ($this
    ->get('recipient_phone_number') as $recipient) {
    $recipients[] = $recipient->value;
  }
  return $recipients;
}