function Node::setCreatedTime

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

Overrides NodeInterface::setCreatedTime

File

core/modules/node/src/Entity/Node.php, line 225

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

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

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