Table of Contents

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

path string

The path.

caption string

The caption.

iconId ImageId

The icon id.

children MenuItem[]

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

path string

The path.

caption string

The caption.

iconId ImageId

The icon id.

code Func<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

path string

The path.

caption string

The caption.

iconId ImageId

The icon id.

to string

The 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

path string

The path.

caption string

The caption.

icon string

The icon name.

children MenuItem[]

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

path string

The path.

caption string

The caption.

icon string

The icon name.

code Func<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

path string

The path.

caption string

The caption.

icon string

The icon name.

to string

The name of the UI view that the menu entry opens.

Properties

Caption

Gets or sets the caption.

public string Caption { get; set; }

Property Value

string

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

Func<Task>

Icon

Gets or sets the icon name.

public string? Icon { get; set; }

Property Value

string

IconId

Gets or sets the icon id.

public ImageId? IconId { get; set; }

Property Value

ImageId

IsBusy

Gets or sets a value indicating whether the menu item is busy executing its code.

public bool IsBusy { get; set; }

Property Value

bool

Parent

Gets or sets the parent menu item.

public MenuItem? Parent { get; set; }

Property Value

MenuItem

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

string

To

Gets or sets the name of the UI view that the menu entry opens.

public string? To { get; set; }

Property Value

string

Visible

Gets or sets a value indicating whether the menu item is visible.

public bool Visible { get; set; }

Property Value

bool

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

Task

A Task representing the asynchronous operation.

ExecuteReportAsync(ExecuteReportOptions)

Execute a report.

public virtual Task ExecuteReportAsync(ExecuteReportOptions options)

Parameters

options ExecuteReportOptions

Report options.

Returns

Task

Task.

ExportServerDataAsync(ServerDataExportOptions)

Executes a server data export.

public virtual Task ExportServerDataAsync(ServerDataExportOptions options)

Parameters

options ServerDataExportOptions

Server 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

options NavigationOptions

Navigation options.

Returns

Task

A Task representing the asynchronous operation.

ShowReportAsync(ShowReportOptions)

Show a report viewer.

public virtual Task ShowReportAsync(ShowReportOptions options)

Parameters

options ShowReportOptions

Report options.

Returns

Task

Task.