You are here

public function Registration::setOwner in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 3.x src/Entity/Registration.php \Drupal\rng\Entity\Registration::setOwner()

Set the owner of the registration to object.

Parameters

\Drupal\user\UserInterface $account: The user account object.

Return value

\Drupal\rng\Entity\RegistrationInterface Returns registration for chaining.

Overrides RegistrationInterface::setOwner

File

src/Entity/Registration.php, line 165

Class

Registration
Defines the registration entity class.

Namespace

Drupal\rng\Entity

Code

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