You are here

public function Individual::addEmail in CRM Core 8.2

Sets email to email list.

Parameters

array $email: Email to add to list.

Overrides IndividualInterface::addEmail

File

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

Class

Individual
CRM Individual Entity Class.

Namespace

Drupal\crm_core_contact\Entity

Code

public function addEmail(array $email) {
  $this
    ->get('email')
    ->appendItem($email);
  return $this;
}