You are here

public function RecentlyRead::setOwner in Recently Read 8

Sets the entity owner's user entity.

Parameters

\Drupal\user\UserInterface $account: The owner user entity.

Return value

$this

Overrides EntityOwnerInterface::setOwner

File

src/Entity/RecentlyRead.php, line 149

Class

RecentlyRead
Defines the Recently read entity.

Namespace

Drupal\recently_read\Entity

Code

public function setOwner(UserInterface $account) {
  $this
    ->set('user_id', $account
    ->id());
  return $this;
}