You are here

public function State::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_event/src/Entity/State.php, line 154
Contains \Drupal\bat_event\Entity\State.

Class

State
Defines the State entity.

Namespace

Drupal\bat_event\Entity

Code

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