You are here

public function Webform::setOwner in Webform 6.x

Same name and namespace in other branches
  1. 8.5 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;
}