You are here

public function PrivateMessageThreadAccessTime::setOwner in Private Message 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/PrivateMessageThreadAccessTime.php, line 71

Class

PrivateMessageThreadAccessTime
The Private Message Thread Access Time entity type definition.

Namespace

Drupal\private_message\Entity

Code

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