You are here

public function Media::getCreatedTime in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::getCreatedTime()

Returns the media item creation timestamp.

@todo Remove and use the new interface when #2833378 is done.

Return value

int Creation timestamp of the media item.

Overrides MediaInterface::getCreatedTime

See also

https://www.drupal.org/node/2833378

File

core/modules/media/src/Entity/Media.php, line 122

Class

Media
Defines the media entity class.

Namespace

Drupal\media\Entity

Code

public function getCreatedTime() {
  return $this
    ->get('created')->value;
}