You are here

public function EckEntity::setChangedTime in Entity Construction Kit (ECK) 8

Sets the timestamp of the last entity change for the current translation.

Parameters

int $timestamp: The timestamp of the last entity save operation.

Return value

\Drupal\eck\EckEntityInterface $this The class instance that this method is called on.

Overrides EckEntityInterface::setChangedTime

File

src/Entity/EckEntity.php, line 121

Class

EckEntity
Defines the ECK entity.

Namespace

Drupal\eck\Entity

Code

public function setChangedTime($timestamp) {
  if ($this
    ->hasField('changed')) {
    $this
      ->set('changed', $timestamp);
  }
  return $this;
}