You are here

public function Reference::setOwner in Bibliography & Citation 8

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

Sets the entity owner's user entity.

Parameters

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

Return value

$this

Overrides EntityOwnerInterface::setOwner

File

modules/bibcite_entity/src/Entity/Reference.php, line 161

Class

Reference
Defines the Reference entity.

Namespace

Drupal\bibcite_entity\Entity

Code

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