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