You are here

public function PushNotificationsToken::getCreatedTime in Push Notifications 8

Returns the entity's created time.

Parameters

string $type: The format type for this date.

Return value

string The created time for this entity.

Overrides PushNotificationsTokenInterface::getCreatedTime

File

src/Entity/PushNotificationsToken.php, line 137
Contains \Drupal\push_notifications\Entity\PushNotificationsToken.

Class

PushNotificationsToken
Defines the token entity.

Namespace

Drupal\push_notifications\Entity

Code

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