Node::getCreatedTime

public Node::getCreatedTime()

Gets the node creation timestamp.

Return value

int Creation timestamp of the node.

Overrides NodeInterface::getCreatedTime

File

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

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

1
2
3
public function getCreatedTime() {
  return $this->get('created')->value;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.