You are here

public function Relation::setIndividual in CRM Core 8

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

Sets the relation individual entity.

Parameters

\Drupal\crm_core_contact\IndividualInterface $individual: The relation individual entity.

Return value

$this

Overrides RelationInterface::setIndividual

File

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

Class

Relation
Defines the relation entity class.

Namespace

Drupal\crm_core_user_sync\Entity

Code

public function setIndividual(IndividualInterface $individual) {
  $this
    ->set('individual_id', $individual
    ->id());
  return $this;
}