Table of Contents

Class ActionExtensions

Namespace
Dynamicweb.CoreUI.Actions
Assembly
Dynamicweb.CoreUI.dll
public static class ActionExtensions
Inheritance
ActionExtensions
Inherited Members

Methods

HasCapability(ActionNode)

Determines whether the given ActionNode has capability attached to it.

public static bool HasCapability(this ActionNode node)

Parameters

node ActionNode

Returns

bool

IsRestrictedForCurrentUser(ActionNode)

Determines whether the given ActionNode is restricted for the current user.

public static bool IsRestrictedForCurrentUser(this ActionNode node)

Parameters

node ActionNode

Returns

bool

IsRestrictedForUser(ActionNode, int)

Determines whether the given ActionNode is restricted for the specified user.

public static bool IsRestrictedForUser(this ActionNode node, int userId)

Parameters

node ActionNode
userId int

Returns

bool

ToModalActions(IEnumerable<ActionNode>)

Converts the given ActionNode collection to actions suitable for modals.

public static IEnumerable<ActionNode> ToModalActions(this IEnumerable<ActionNode> actions)

Parameters

actions IEnumerable<ActionNode>

The actions to convert.

Returns

IEnumerable<ActionNode>

TrySetCapability<T>(T?, CapabilityKey)

Tries to set the capability for this ActionNode. If the underlying action node type does not allow changing capabilities, nothing will happen.

public static T? TrySetCapability<T>(this T? node, CapabilityKey capability) where T : ActionNode

Parameters

node T

The node to set primary capability for.

capability CapabilityKey

The specific capability to set as the primary for the node.

Returns

T

Type Parameters

T

The node type to set primary capability for.

To top