public function FlippingBook::setOwner in Flipping Book 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/ FlippingBook.php, line 156
Class
- FlippingBook
- Defines the Flipping Book entity.
Namespace
Drupal\flipping_book\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('user_id', $account
->id());
return $this;
}