You are here

public function Individual::setMainEmail in CRM Core 8.2

Sets main email of individual.

Parameters

array $email: Main email.

Overrides IndividualInterface::setMainEmail

File

modules/crm_core_contact/src/Entity/Individual.php, line 156

Class

Individual
CRM Individual Entity Class.

Namespace

Drupal\crm_core_contact\Entity

Code

public function setMainEmail(array $email) {
  $this
    ->get('email')
    ->set(0, $email);
  return $this;
}