You are here

public function Relation::setUser in CRM Core 8.3

Same name and namespace in other branches
  1. 8 modules/crm_core_user_sync/src/Entity/Relation.php \Drupal\crm_core_user_sync\Entity\Relation::setUser()

Sets the relation user entity.

Parameters

\Drupal\user\UserInterface $account: The relation user entity.

Return value

$this

Overrides RelationInterface::setUser

File

modules/crm_core_user_sync/src/Entity/Relation.php, line 75

Class

Relation
Defines the relation entity class.

Namespace

Drupal\crm_core_user_sync\Entity

Code

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