Class ContentCopyingNotification
Notification that is published before content is copied.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public sealed class ContentCopyingNotification : CopyingNotification<IContent>, IStatefulNotification, ICancelableNotification, INotification
Remarks
This notification is cancelable, allowing handlers to prevent the copy operation. The notification is published by the IContentService after a copy object has been created and its parentId updated and state set to unpublished, but before it is persisted.
Constructors
View SourceContentCopyingNotification(IContent, IContent, int, Guid?, EventMessages)
Initializes a new instance of the ContentCopyingNotification class.
Declaration
public ContentCopyingNotification(IContent original, IContent copy, int parentId, Guid? parentKey, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | original | The original content item being copied. |
| IContent | copy | The copy of the content item. |
| int | parentId | The ID of the new parent. |
| Guid? | parentKey | The key of the new parent. |
| EventMessages | messages | The event messages collection. |
ContentCopyingNotification(IContent, IContent, int, EventMessages)
Initializes a new instance of the ContentCopyingNotification class.
Declaration
[Obsolete("Please use constructor that takes a parent key as well. Scheduled for removal in Umbraco 18.")]
public ContentCopyingNotification(IContent original, IContent copy, int parentId, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | original | The original content item being copied. |
| IContent | copy | The copy of the content item. |
| int | parentId | The ID of the new parent. |
| EventMessages | messages | The event messages collection. |