function Media::setCreatedTime

Same name and namespace in other branches
  1. 8.9.x core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::setCreatedTime()
  2. 10 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::setCreatedTime()
  3. 11.x core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::setCreatedTime()

Sets the media item creation timestamp.

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

Parameters

int $timestamp: The media creation timestamp.

Return value

$this The called media item.

Overrides MediaInterface::setCreatedTime

File

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

Class

Media
Defines the media entity class.

Namespace

Drupal\media\Entity

Code

public function setCreatedTime($timestamp) {
    return $this->set('created', $timestamp);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.