You are here

public function ProductBundle::setOwner in Commerce Product Bundle 8

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/ProductBundle.php, line 141

Class

ProductBundle
Defines the product bundle entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

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