You are here

public function EntityOwnerTrait::setOwnerId in Profile 8

File

src/EntityOwnerTrait.php, line 60

Class

EntityOwnerTrait
Provides a trait for entities that have an owner.

Namespace

Drupal\profile

Code

public function setOwnerId($uid) {
  $key = $this
    ->getEntityType()
    ->getKey('owner');
  $this
    ->set($key, $uid);
  return $this;
}