public function EntityOwnerTrait::setOwner in CRM Core 8
Same name and namespace in other branches
- 8.2 src/EntityOwnerTrait.php \Drupal\crm_core\EntityOwnerTrait::setOwner()
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
File
- src/
EntityOwnerTrait.php, line 61
Class
- EntityOwnerTrait
- Trait implementing the various methods defined in EntityOwnerInterface.
Namespace
Drupal\crm_coreCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}