You are here

public function Conditions::setOwner in Legal 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Conditions.php \Drupal\legal\Entity\Conditions::setOwner()

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/Conditions.php, line 79

Class

Conditions
Defines the Legal Terms & Conditions entity.

Namespace

Drupal\legal\Entity

Code

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