You are here

public function Accepted::setOwner in Legal 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Accepted.php \Drupal\legal\Entity\Accepted::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/Accepted.php, line 79

Class

Accepted
Defines the Legal Terms & Conditions accepted entity.

Namespace

Drupal\legal\Entity

Code

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