You are here

public function OpignoNotification::getCreatedTime in Opigno notifications 3.x

Same name and namespace in other branches
  1. 8 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 184

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'];
}