You are here

public function OpignoModule::setOwner in Opigno module 3.x

Same name and namespace in other branches
  1. 8 src/Entity/OpignoModule.php \Drupal\opigno_module\Entity\OpignoModule::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/OpignoModule.php, line 166

Class

OpignoModule
Defines the Module entity.

Namespace

Drupal\opigno_module\Entity

Code

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