Files
Umbraco-CMS/src/Umbraco.Web.BackOffice/Trees/MenuRenderingNotification.cs
Nikolaj Geisle e762fa91bc V10: fix build warnings in Web.BackOffice (#12479)
* Run code cleanup

* Start manual run

* Finish dotnet format + manual cleanup

* Fix up after merge

* Fix substrings changed to [..]

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-20 08:37:17 +02:00

43 lines
1.2 KiB
C#

using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.Trees;
namespace Umbraco.Cms.Core.Notifications;
/// <summary>
/// A notification that allows developers to modify the menu that is being rendered
/// </summary>
/// <remarks>
/// Developers can add/remove/replace/insert/update/etc... any of the tree items in the collection.
/// </remarks>
public class MenuRenderingNotification : INotification
{
public MenuRenderingNotification(string nodeId, MenuItemCollection menu, FormCollection queryString,
string treeAlias)
{
NodeId = nodeId;
Menu = menu;
QueryString = queryString;
TreeAlias = treeAlias;
}
/// <summary>
/// The tree node id that the menu is rendering for
/// </summary>
public string NodeId { get; }
/// <summary>
/// The alias of the tree the menu is rendering for
/// </summary>
public string TreeAlias { get; }
/// <summary>
/// The menu being rendered
/// </summary>
public MenuItemCollection Menu { get; }
/// <summary>
/// The query string of the current request
/// </summary>
public FormCollection QueryString { get; }
}