function RevisionLogEntityTrait::setRevisionCreationTime

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionCreationTime()
  2. 10 core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionCreationTime()
  3. 11.x core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php \Drupal\Core\Entity\RevisionLogEntityTrait::setRevisionCreationTime()

Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime().

1 method overrides RevisionLogEntityTrait::setRevisionCreationTime()
BlockContent::setRevisionCreationTime in core/modules/block_content/src/Entity/BlockContent.php
Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime().

File

core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php, line 65

Class

RevisionLogEntityTrait
Provides a trait for accessing revision logging and ownership information.

Namespace

Drupal\Core\Entity

Code

public function setRevisionCreationTime($timestamp) {
    $this->{static::getRevisionMetadataKey($this->getEntityType(), 'revision_created')}->value = $timestamp;
    return $this;
}

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