You are here

public function Flipbook::setOwner in 3D Flipbook 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/Flipbook.php, line 203

Class

Flipbook
Defines the Flipbook entity.

Namespace

Drupal\flipbook\Entity

Code

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