You are here

public function TweetEntity::setOwner in Tweet Feed 8.3

Same name and namespace in other branches
  1. 4.x src/Entity/TweetEntity.php \Drupal\tweet_feed\Entity\TweetEntity::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/TweetEntity.php, line 100

Class

TweetEntity
Defines the Tweet Feed Tweet entity.

Namespace

Drupal\tweet_feed\Entity

Code

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