public function Unit::setOwner in Booking and Availability Management Tools for Drupal 8
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
Overrides EntityOwnerInterface::setOwner
File
- modules/
bat_unit/ src/ Entity/ Unit.php, line 109 - Contains \Drupal\bat_unit\Entity\Unit.
Class
- Unit
- Defines the Unit entity.
Namespace
Drupal\bat_unit\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}