You are here

public function Heartbeat::setUid in Heartbeat 8

Sets the Heartbeat user.

Parameters

int uid: The Heartbeat user.

Throws

\Drupal\Core\Entity\EntityStorageException

Overrides HeartbeatInterface::setUid

File

src/Entity/Heartbeat.php, line 981

Class

Heartbeat

Namespace

Drupal\heartbeat\Entity

Code

public function setUid($uid) {
  $this
    ->set('uid', $uid)
    ->save();
}