Class ContentPublishingNotification
Notification that is published before content is published.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public sealed class ContentPublishingNotification : CancelableEnumerableObjectNotification<IContent>, IStatefulNotification, ICancelableNotification, INotification
Remarks
This notification is cancelable, allowing handlers to prevent the publish operation. The notification is published by the IContentService before content is made publicly available.
Constructors
View SourceContentPublishingNotification(IEnumerable<IContent>, EventMessages)
Initializes a new instance of the ContentPublishingNotification class with multiple content items.
Declaration
public ContentPublishingNotification(IEnumerable<IContent> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IContent> | target | The collection of content items being published. |
| EventMessages | messages | The event messages collection. |
ContentPublishingNotification(IContent, EventMessages)
Initializes a new instance of the ContentPublishingNotification class with a single content item.
Declaration
public ContentPublishingNotification(IContent target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | target | The content item being published. |
| EventMessages | messages | The event messages collection. |
Properties
View SourcePublishedEntities
Gets the collection of IContent items being published.
Declaration
public IEnumerable<IContent> PublishedEntities { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<IContent> |