You are here

public function SmsDeliveryReport::getTimeDelivered in SMS Framework 2.x

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

Gets the time the message was delivered to the recipient.

Return value

int|null The timestamp when the message was delivered to the recipient, or NULL if unknown.

Overrides SmsDeliveryReportInterface::getTimeDelivered

File

src/Entity/SmsDeliveryReport.php, line 141

Class

SmsDeliveryReport
Defines the SMS message delivery report entity.

Namespace

Drupal\sms\Entity

Code

public function getTimeDelivered() {
  $delivered = $this
    ->getRevisionAtStatus(SmsMessageReportStatus::DELIVERED);
  return $delivered ? $delivered
    ->getStatusTime() : NULL;
}