public function OpignoAnswer::setOwner in Opigno module 8
Same name and namespace in other branches
- 3.x src/Entity/OpignoAnswer.php \Drupal\opigno_module\Entity\OpignoAnswer::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/ OpignoAnswer.php, line 134
Class
- OpignoAnswer
- Defines the Answer entity.
Namespace
Drupal\opigno_module\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('user_id', $account
->id());
return $this;
}