You are here

public function Webform::setOwner in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::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/Webform.php, line 529

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

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