You are here

public function OpignoNotification::getCreatedTime in Opigno notifications 8

Same name and namespace in other branches
  1. 3.x src/Entity/OpignoNotification.php \Drupal\opigno_notification\Entity\OpignoNotification::getCreatedTime()

Gets the notification created timestamp.

Return value

int The created timestamp for the notification.

Overrides OpignoNotificationInterface::getCreatedTime

File

src/Entity/OpignoNotification.php, line 141

Class

OpignoNotification
Defines the opigno_notification entity.

Namespace

Drupal\opigno_notification\Entity

Code

public function getCreatedTime() {
  $value = $this
    ->get('created')
    ->getValue();
  if (!isset($value)) {
    return NULL;
  }
  return $value[0]['value'];
}