You are here

public function Log::setOwner in Log entity 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/Log.php, line 185
Contains \Drupal\log\Entity\Log.

Class

Log
Defines the Log entity.

Namespace

Drupal\log\Entity

Code

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