public function Booking::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_booking/ src/ Entity/ Booking.php, line 86 - Contains \Drupal\bat_booking\Entity\Booking.
Class
- Booking
- Defines the Booking entity.
Namespace
Drupal\bat_booking\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}