public function SmsMessageResult::getReport in SMS Framework 8
Same name in this branch
- 8 src/Message/SmsMessageResult.php \Drupal\sms\Message\SmsMessageResult::getReport()
- 8 src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::getReport()
Same name and namespace in other branches
- 2.x src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::getReport()
- 2.1.x src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::getReport()
Gets the delivery report for a particular recipient.
Parameters
string $recipient: The number of the recipient for which the report is to be retrieved.
Return value
\Drupal\sms\Message\SmsDeliveryReportInterface|null A delivery report object, or NULL if there is no report for the recipient.
Overrides SmsMessageResultInterface::getReport
See also
SmsMessageResultInterface::getReports()
File
- src/
Entity/ SmsMessageResult.php, line 78
Class
- SmsMessageResult
- Defines the SMS message result entity.
Namespace
Drupal\sms\EntityCode
public function getReport($recipient) {
foreach ($this
->getReports() as $report) {
if ($report
->getRecipient() === $recipient) {
return $report;
}
}
return NULL;
}