Add notification flag to indicate the current publish operation includes descendants (#13145)
This commit is contained in:
@@ -21,8 +21,11 @@ public sealed class ContentPublishedNotification : EnumerableObjectNotification<
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a enumeration of <see cref="IContent"/> with the published entities.
|
||||
public ContentPublishedNotification(IEnumerable<IContent> target, EventMessages messages, bool includeDescendants)
|
||||
: base(target, messages) => IncludeDescendants = includeDescendants;
|
||||
|
||||
/// </summary>
|
||||
public IEnumerable<IContent> PublishedEntities => Target;
|
||||
|
||||
public bool IncludeDescendants { get; set; }
|
||||
}
|
||||
|
||||
@@ -2164,7 +2164,7 @@ public class ContentService : RepositoryService, IContentService
|
||||
// (SaveAndPublishBranchOne does *not* do it)
|
||||
scope.Notifications.Publish(
|
||||
new ContentTreeChangeNotification(document, TreeChangeTypes.RefreshBranch, eventMessages));
|
||||
scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages));
|
||||
scope.Notifications.Publish(new ContentPublishedNotification(publishedDocuments, eventMessages, true));
|
||||
|
||||
scope.Complete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user