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