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
nodeActionNode
Returns
IsRestrictedForCurrentUser(ActionNode)
Determines whether the given ActionNode is restricted for the current user.
public static bool IsRestrictedForCurrentUser(this ActionNode node)
Parameters
nodeActionNode
Returns
IsRestrictedForUser(ActionNode, int)
Determines whether the given ActionNode is restricted for the specified user.
public static bool IsRestrictedForUser(this ActionNode node, int userId)
Parameters
nodeActionNodeuserIdint
Returns
ToModalActions(IEnumerable<ActionNode>)
Converts the given ActionNode collection to actions suitable for modals.
public static IEnumerable<ActionNode> ToModalActions(this IEnumerable<ActionNode> actions)
Parameters
actionsIEnumerable<ActionNode>The actions to convert.
Returns
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
nodeTThe node to set primary capability for.
capabilityCapabilityKeyThe specific capability to set as the primary for the node.
Returns
- T
Type Parameters
TThe node type to set primary capability for.