You are here

public function Individual::getMainEmail in CRM Core 8.2

Gets main email of individual.

Return value

array Main email of individual.

Overrides IndividualInterface::getMainEmail

File

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

Class

Individual
CRM Individual Entity Class.

Namespace

Drupal\crm_core_contact\Entity

Code

public function getMainEmail() {
  return $this
    ->get('email')
    ->first()
    ->getValue();
}