public function WebformSubmission::setOwner in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/WebformSubmission.php \Drupal\webform\Entity\WebformSubmission::setOwner()
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
Overrides EntityOwnerInterface::setOwner
1 call to WebformSubmission::setOwner()
- WebformSubmission::convert in src/
Entity/ WebformSubmission.php - Convert anonymous submission to authenticated.
File
- src/
Entity/ WebformSubmission.php, line 636
Class
- WebformSubmission
- Defines the WebformSubmission entity.
Namespace
Drupal\webform\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}