Created
April 13, 2023 12:59
-
-
Save hishaamn/bf8f148814312d9b73f70413b146b71d to your computer and use it in GitHub Desktop.
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
| public class ItemPackageEvent | |
| { | |
| public void OnPackageInstallItemsEndHandler(object sender, EventArgs e) | |
| { | |
| if (e == null) | |
| { | |
| return; | |
| } | |
| SitecoreEventArgs sitecoreEventArgs = e as SitecoreEventArgs; | |
| if (sitecoreEventArgs == null || sitecoreEventArgs.Parameters == null || sitecoreEventArgs.Parameters.Length != 1) | |
| { | |
| return; | |
| } | |
| InstallationEventArgs parameter = sitecoreEventArgs.Parameters[0] as InstallationEventArgs; | |
| // The paramter.ItemsToInstall provides the list of items together with the item id, language that have been installed on the CMS | |
| // Check for null in case no item is available. | |
| if (parameter == null || parameter.ItemsToInstall == null) | |
| { | |
| return; | |
| } | |
| // Implementation goes here for processing the list of items | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment