Open
Conversation
Preview of modified filesPreview of modified Markdown: |
9c409da to
b28445e
Compare
b28445e to
f708502
Compare
docs/cdp/cdp_data_customization.md
Outdated
|
|
||
| The `priority` parameter controls the order of execution when multiple processors are registered. | ||
| Higher priority values run first. | ||
| Your custom processor merges data with `$processedItemData` from previous processors, allowing you to chain multiple processors together. |
Contributor
There was a problem hiding this comment.
As
return array_merge(
$processedItemData,
[
'date_of_birth' => $dateOfBirth,
]
);is equivalent to
$processedItemData['date_of_birth'] = $dateOfBirth;
return $processedItemData;there might be a simpler way to tell things (even if array_merge is probably more readable when a huge data array is added):
Suggested change
| Your custom processor merges data with `$processedItemData` from previous processors, allowing you to chain multiple processors together. | |
| Your custom processor adds data to the previous processors result and returns the whole, allowing to chain multiple processors together. |
I guess you could even have a processor than transform previous data (for example $processedItemData['date_of_birth'] = $this->formatDate($processedItemData['date_of_birth'])).
code_samples/ change report
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Target: 4.6, 5.0
The doc is missing the extension points introduced in https://github.com/ibexa/corporate-account/pull/174 and https://github.com/ibexa/cdp/pull/11
This PR focuses on showing how to add custom fields to user data export, as this is something that has been raised by partners.
Tested locally: