Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentCopyingNotification

    Notification that is published before content is copied.

    Inheritance
    object
    StatefulNotification
    ObjectNotification<IContent>
    CancelableObjectNotification<IContent>
    CopyingNotification<IContent>
    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 Source

    ContentCopyingNotification(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.

    View Source

    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.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX