function EntityOwnerTrait::setOwnerId
File
-
core/
modules/ user/ src/ EntityOwnerTrait.php, line 55
Class
- EntityOwnerTrait
- Provides a trait for entities that have an owner.
Namespace
Drupal\userCode
public function setOwnerId($uid) {
$key = $this->getEntityType()
->getKey('owner');
$this->set($key, $uid);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.