Substitute for old DocumentEvents.Copy.Before / After in XbyK?
I'm looking to port a Module over th XbyK from K13, and am looking for valid replacements for the above named Events. Do such things exist in XbyK?
A colleague pointed me to the CloneSettings.OnCloneInsert
API, and this is implemented easily enough in a Module. But, I was told this by the AI Assistant on the docs.kentico.com page:
Based on the available documentation, the CloneSettings.OnCloneInsert delegate in Xperience by Kentico is designed to handle actions before or after inserting a clone, allowing you to further modify the object according to your settings. This delegate provides hooks similar in spirit to the event-based approach in Kentico 13, but it is focused on the cloning process rather than document copy events specifically.
However, there is no explicit mention in the provided documentation that these callbacks are a direct or full replacement for the DocumentEvents.Copy.Before and DocumentEvents.Copy.After events. The new API is more focused on object cloning rather than document-specific copy events, and there may be differences in scope and behavior due to architectural changes in Xperience by Kentico.
So, I'm a little hesitant here now - the above seems logical (that the API is clone-centric and not really meant for copy), but I am unsure. Is this truly a valid replacement for the old(er) Copy events?
Thanks,
Chris
Environment
Xperience by Kentico version: [30.6.0]
.NET version: [8|9]
Execution environment: [SaaS|Private cloud (Azure/AWS/Virtual machine)]
Link to relevant Xperience by Kentico documentation
Answers
Aren't you looking for the global event handlers?
https://docs.kentico.com/documentation/developers-and-admins/customization/handle-global-events
It should be pretty much the same as in Kx13.
To answer this question, you have to login first.