| @@ 1160-1172 (lines=13) @@ | ||
| 1157 | * |
|
| 1158 | * @return ContactEmail|null |
|
| 1159 | */ |
|
| 1160 | public function getPrimaryEmail() |
|
| 1161 | { |
|
| 1162 | $result = null; |
|
| 1163 | ||
| 1164 | foreach ($this->getEmails() as $email) { |
|
| 1165 | if ($email->isPrimary()) { |
|
| 1166 | $result = $email; |
|
| 1167 | break; |
|
| 1168 | } |
|
| 1169 | } |
|
| 1170 | ||
| 1171 | return $result; |
|
| 1172 | } |
|
| 1173 | ||
| 1174 | /** |
|
| 1175 | * @param ContactEmail $email |
|
| @@ 1312-1324 (lines=13) @@ | ||
| 1309 | * |
|
| 1310 | * @return LeadEmail|null |
|
| 1311 | */ |
|
| 1312 | public function getPrimaryEmail() |
|
| 1313 | { |
|
| 1314 | $result = null; |
|
| 1315 | ||
| 1316 | foreach ($this->getEmails() as $email) { |
|
| 1317 | if ($email->isPrimary()) { |
|
| 1318 | $result = $email; |
|
| 1319 | break; |
|
| 1320 | } |
|
| 1321 | } |
|
| 1322 | ||
| 1323 | return $result; |
|
| 1324 | } |
|
| 1325 | ||
| 1326 | /** |
|
| 1327 | * @return string |
|