You are here

public function PushNotification::getCreatedTime in Push Notifications 8

File

src/Entity/PushNotification.php, line 149
Contains Drupal\push_notifications\Entity\PushNotification.

Class

PushNotification
Defines the push_notification entity.

Namespace

Drupal\push_notifications\Entity

Code

public function getCreatedTime($type = 'short') {
  return \Drupal::service('date.formatter')
    ->format($this
    ->getCreated(), $type);
}