You are here

public function Node::setCreatedTime in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::setCreatedTime()

Sets the node creation timestamp.

Parameters

int $timestamp: The node creation timestamp.

Return value

\Drupal\node\NodeInterface The called node entity.

Overrides NodeInterface::setCreatedTime

File

core/modules/node/src/Entity/Node.php, line 212
Contains \Drupal\node\Entity\Node.

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

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