Skip to content
Snippets Groups Projects
Unverified Commit 3e414b29 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #521 from JKingsnorth/alterMergeLocationData

Add docs for hook_civicrm_alterLocationMergeData
parents ba8b5606 49a292f6
No related branches found
No related tags found
No related merge requests found
# hook_civicrm_alterLocationMergeData
## Summary
This hook allows you to alter the location information that will be moved from
the duplicate contact to the master contact.
## Availability
This hook was first available in CiviCRM 4.7.10.
## Definition
```php
hook_civicrm_alterLocationMergeData(&$blocksDAO, $mainId, $otherId, $migrationInfo)
```
## Parameters
* array $blocksDAO: Array of location DAO to be saved. These are arrays in 2 keys 'update' & 'delete'.
* int $mainId: Contact ID of the contact that survives the merge.
* int $otherId: Contact ID of the contact that will be absorbed and deleted.
* array $migrationInfo: Calculated migration info.
## Details
The $blocksDAO contains a list of 'location blocks' (eg: emails, phones,
addresses) which will be updated or deleted as part of the merge. This is
formatted like:
```php
[
email
delete
id => object
update
id => object
address
delete
id => object
update
id => object
]
```
......@@ -77,6 +77,7 @@ pages:
- hook_civicrm_custom: hooks/hook_civicrm_custom.md
- hook_civicrm_managed: hooks/hook_civicrm_managed.md
- hook_civicrm_merge: hooks/hook_civicrm_merge.md
- hook_civicrm_alterLocationMergeData: hooks/hook_civicrm_alterLocationMergeData.md
- hook_civicrm_post: hooks/hook_civicrm_post.md
- hook_civicrm_postSave_table_name: hooks/hook_civicrm_postSave_table_name.md
- hook_civicrm_pre: hooks/hook_civicrm_pre.md
......
......@@ -11,6 +11,7 @@ hook_civicrm_copy hooks/hook_civicrm_copy
hook_civicrm_custom hooks/hook_civicrm_custom
hook_civicrm_managed hooks/hook_civicrm_managed
hook_civicrm_merge hooks/hook_civicrm_merge
hook_civicrm_alterLocationMergeData hooks/hook_civicrm_alterLocationMergeData
hook_civicrm_post hooks/hook_civicrm_post
hook_civicrm_pre hooks/hook_civicrm_pre
hook_civicrm_trigger_info hooks/hook_civicrm_triggerInfo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment