You are here

public function OpignoCertificate::setOwner in Opigno certificate 8

Same name and namespace in other branches
  1. 3.x src/Entity/OpignoCertificate.php \Drupal\opigno_certificate\Entity\OpignoCertificate::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/OpignoCertificate.php, line 159

Class

OpignoCertificate
Defines the opigno_certificate entity class.

Namespace

Drupal\opigno_certificate\Entity

Code

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