You are here

public function ImportEntity::setOwner in Content Synchronizer 8.2

Same name and namespace in other branches
  1. 8 src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::setOwner()
  2. 3.x src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::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/ImportEntity.php, line 165

Class

ImportEntity
Defines the Import entity.

Namespace

Drupal\content_synchronizer\Entity

Code

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