Skip to content

Commit

Permalink
Update Cord.php
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbj authored Feb 19, 2024
1 parent 92c4f54 commit 49023fe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Cord.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ public function addContact(array $contactDetails): self
'Mobile' => $contactDetails['mobilePhone'] ?? '',
'HomeWork' => $contactDetails['homePhone'] ?? '',
'AttachmentType' => $contactDetails['attachmentType'] ?? 'PDF',
/*'OrgDocumentCollection' => [
'OrgDocumentCollection' => [
'OrgDocument' => count($documents) === 1 ? $documents[0] : $documents,
], */
],
];

return $this;
Expand Down Expand Up @@ -368,9 +368,11 @@ public function transferContact(array $contact)
}

foreach ($contact['OrgDocumentCollection']['OrgDocument'] as $key => $docs) {
$contact['OrgDocumentCollection']['OrgDocument'][$key]['_attributes'] = [
'Action' => 'MERGE',
];
if(isset($contact['OrgDocumentCollection']['OrgDocument'][$key]['MenuItem'])){
$contact['OrgDocumentCollection']['OrgDocument'][$key]['MenuItem']['_attributes'] = [
'Action' => 'MERGE',
];
}
}

}
Expand Down

0 comments on commit 49023fe

Please sign in to comment.