public function Node::setCreatedTime in Drupal 8
Same name and namespace in other branches
- 9 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
$this The called node entity.
Overrides NodeInterface::setCreatedTime
File
- core/
modules/ node/ src/ Entity/ Node.php, line 223
Class
- Node
- Defines the node entity class.
Namespace
Drupal\node\EntityCode
public function setCreatedTime($timestamp) {
$this
->set('created', $timestamp);
return $this;
}