You are here

public function BrightcoveCmsEntity::setOwner in Brightcove Video Connect 8

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

Class

BrightcoveCmsEntity
Common base class for CMS entities like Video and Playlist.

Namespace

Drupal\brightcove\Entity

Code

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