Class MenuItem
- Namespace
- GroupeIsa.Neos.Designer.UIAbstractions.Menu
- Assembly
- GroupeIsa.Neos.Designer.UIAbstractions.dll
Represents the abstraction of a menu item on the client side.
[ExcludeFromCodeCoverage]
public class MenuItem
- Inheritance
-
MenuItem
- Inherited Members
Constructors
MenuItem()
Initializes a new instance of the MenuItem class.
public MenuItem()
MenuItem(string, string, ImageId?, MenuItem[])
Initializes a new instance of the MenuItem class.
public MenuItem(string path, string caption, ImageId? iconId, MenuItem[] children)
Parameters
pathstringThe path.
captionstringThe caption.
iconIdImageIdThe icon id.
childrenMenuItem[]The child menu items.
MenuItem(string, string, ImageId?, Func<Task>)
Initializes a new instance of the MenuItem class.
public MenuItem(string path, string caption, ImageId? iconId, Func<Task> code)
Parameters
pathstringThe path.
captionstringThe caption.
iconIdImageIdThe icon id.
codeFunc<Task>The code.
MenuItem(string, string, ImageId?, string)
Initializes a new instance of the MenuItem class.
public MenuItem(string path, string caption, ImageId? iconId, string to)
Parameters
pathstringThe path.
captionstringThe caption.
iconIdImageIdThe icon id.
tostringThe name of the UI view that the menu entry opens.
MenuItem(string, string, string?, MenuItem[])
Initializes a new instance of the MenuItem class.
[Obsolete("Using string literals for image name is error-prone. Use the constructor with an ImageId parameter to benefit from compile-time safety.", false)]
public MenuItem(string path, string caption, string? icon, MenuItem[] children)
Parameters
pathstringThe path.
captionstringThe caption.
iconstringThe icon name.
childrenMenuItem[]The child menu items.
MenuItem(string, string, string?, Func<Task>)
Initializes a new instance of the MenuItem class.
[Obsolete("Using string literals for image name is error-prone. Use the constructor with an ImageId parameter to benefit from compile-time safety.", false)]
public MenuItem(string path, string caption, string? icon, Func<Task> code)
Parameters
pathstringThe path.
captionstringThe caption.
iconstringThe icon name.
codeFunc<Task>The code.
MenuItem(string, string, string?, string)
Initializes a new instance of the MenuItem class.
[Obsolete("Using string literals for image name is error-prone. Use the constructor with an ImageId parameter to benefit from compile-time safety.", false)]
public MenuItem(string path, string caption, string? icon, string to)
Parameters
pathstringThe path.
captionstringThe caption.
iconstringThe icon name.
tostringThe name of the UI view that the menu entry opens.
Properties
Caption
Gets or sets the caption.
public string Caption { get; set; }
Property Value
Children
Gets or sets the child menu items.
public MenuItem[]? Children { get; set; }
Property Value
- MenuItem[]
Code
Gets or sets the code that the menu entry executes.
public Func<Task>? Code { get; set; }
Property Value
Icon
Gets or sets the icon name.
public string? Icon { get; set; }
Property Value
IconId
Gets or sets the icon id.
public ImageId? IconId { get; set; }
Property Value
IsBusy
Gets or sets a value indicating whether the menu item is busy executing its code.
public bool IsBusy { get; set; }
Property Value
Parent
Gets or sets the parent menu item.
public MenuItem? Parent { get; set; }
Property Value
Path
Gets or sets the path leading to menu entry from the root of the menu containing it.
public string Path { get; set; }
Property Value
To
Gets or sets the name of the UI view that the menu entry opens.
public string? To { get; set; }
Property Value
Visible
Gets or sets a value indicating whether the menu item is visible.
public bool Visible { get; set; }
Property Value
Methods
ExecuteAsync()
Executes.
[SuppressMessage("Minor Code Smell", "S2325:Methods and properties that don't access instance data should be static", Justification = "Transpilation")]
public Task ExecuteAsync()
Returns
ExecuteReportAsync(ExecuteReportOptions)
Execute a report.
public virtual Task ExecuteReportAsync(ExecuteReportOptions options)
Parameters
optionsExecuteReportOptionsReport options.
Returns
- Task
Task.
ExportServerDataAsync(ServerDataExportOptions)
Executes a server data export.
public virtual Task ExportServerDataAsync(ServerDataExportOptions options)
Parameters
optionsServerDataExportOptionsServer data export options.
Returns
- Task
Task.
NavigateAsync(NavigationOptions)
Navigates to a view.
[SuppressMessage("Minor Code Smell", "S2325:Methods and properties that don't access instance data should be static", Justification = "Transpilation")]
public Task NavigateAsync(NavigationOptions options)
Parameters
optionsNavigationOptionsNavigation options.
Returns
ShowReportAsync(ShowReportOptions)
Show a report viewer.
public virtual Task ShowReportAsync(ShowReportOptions options)
Parameters
optionsShowReportOptionsReport options.
Returns
- Task
Task.