You are here

public function CountryList::setOwner in Country, State and City Fields 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/CountryList.php, line 151

Class

CountryList
Defines the countrylist entity.

Namespace

Drupal\country_state_city\Entity

Code

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