Node::setCreatedTime

public Node::setCreatedTime($timestamp)

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 211

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function setCreatedTime($timestamp) {
  $this->set('created', $timestamp);
  return $this;
}
doc_Drupal
2016-10-29 09:30:24
Comments
Leave a Comment

Please login to continue.