You are here

public function UnitType::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/UnitType.php, line 114
Contains \Drupal\bat_unit\Entity\UnitType.

Class

UnitType
Defines the Unit type entity.

Namespace

Drupal\bat_unit\Entity

Code

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