You are here

public function TwitterWidget::setOwner in Twitter Profile Widget 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/TwitterWidget.php, line 126

Class

TwitterWidget
Defines the Twitter widget entity.

Namespace

Drupal\twitter_profile_widget\Entity

Code

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