You are here

public function ILTResult::setUser in Opigno Instructor-led Trainings 3.x

Same name and namespace in other branches
  1. 8 src/Entity/ILTResult.php \Drupal\opigno_ilt\Entity\ILTResult::setUser()

Sets the user entity.

Parameters

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

Return value

$this

Overrides ILTResultInterface::setUser

File

src/Entity/ILTResult.php, line 86

Class

ILTResult
Defines the ILT Result entity.

Namespace

Drupal\opigno_ilt\Entity

Code

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