2021-02-23 16:09:36 +01:00
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Umbraco.Cms.Core.Trees;
|
|
|
|
|
|
2021-05-11 14:33:49 +02:00
|
|
|
namespace Umbraco.Cms.Core.Notifications
|
2021-02-23 16:09:36 +01:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A notification that allows developers to modify the tree node collection that is being rendered
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Developers can add/remove/replace/insert/update/etc... any of the tree items in the collection.
|
|
|
|
|
/// </remarks>
|
2021-02-24 08:56:41 +01:00
|
|
|
public class TreeNodesRenderingNotification : INotification
|
2021-02-23 16:09:36 +01:00
|
|
|
{
|
2021-02-23 16:20:22 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The tree nodes being rendered
|
|
|
|
|
/// </summary>
|
2021-02-23 16:09:36 +01:00
|
|
|
public TreeNodeCollection Nodes { get; }
|
|
|
|
|
|
2021-02-23 16:20:22 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The query string of the current request
|
|
|
|
|
/// </summary>
|
|
|
|
|
public FormCollection QueryString { get; }
|
2021-02-23 16:09:36 +01:00
|
|
|
|
2021-03-22 08:59:17 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The alias of the tree rendered
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string TreeAlias { get; }
|
|
|
|
|
|
|
|
|
|
public TreeNodesRenderingNotification(TreeNodeCollection nodes, FormCollection queryString, string treeAlias)
|
2021-02-23 16:09:36 +01:00
|
|
|
{
|
|
|
|
|
Nodes = nodes;
|
2021-02-23 16:20:22 +01:00
|
|
|
QueryString = queryString;
|
2021-03-22 08:59:17 +01:00
|
|
|
TreeAlias = treeAlias;
|
2021-02-23 16:09:36 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|