You are here

public function SmsMessageResult::getReports in SMS Framework 2.x

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

Gets the delivery reports for all recipients.

Return value

\Drupal\sms\Message\SmsDeliveryReportInterface[] An array of delivery reports.

Overrides SmsMessageResultInterface::getReports

1 call to SmsMessageResult::getReports()
SmsMessageResult::getReport in src/Entity/SmsMessageResult.php
Gets the delivery report for a particular recipient.

File

src/Entity/SmsMessageResult.php, line 92

Class

SmsMessageResult
Defines the SMS message result entity.

Namespace

Drupal\sms\Entity

Code

public function getReports() {
  if ($this->reports) {
    return $this->reports;
  }
  if ($this
    ->getSmsMessage()) {
    return $this
      ->getSmsMessage()
      ->getReports();
  }
  return [];
}