You are here

public function RngContact::setOwner in RNG Contact 8

Sets the entity owner's user entity.

Parameters

\Drupal\user\UserInterface $account: The owner user entity.

Return value

$this

Overrides EntityOwnerInterface::setOwner

File

src/Entity/RngContact.php, line 77

Class

RngContact
Defines the contact entity.

Namespace

Drupal\rng_contact\Entity

Code

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