You are here

public function Message::setCreatedTime in Message 8

Setting the timestamp.

Parameters

int $timestamp: The Unix timestamp.

Return value

\Drupal\message\MessageInterface Returns the message object.

Overrides MessageInterface::setCreatedTime

File

src/Entity/Message.php, line 98

Class

Message
Defines the Message entity class.

Namespace

Drupal\message\Entity

Code

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