• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class ModuleActionCollection

Represents a collection of ModuleAction objects.

Inheritance
System.Object
ModuleActionCollection
Namespace: DotNetNuke.Entities.Modules.Actions
Assembly: DotNetNuke.dll
Syntax
public class ModuleActionCollection : CollectionBase
Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

Constructors

| Improve this Doc View Source

ModuleActionCollection()

Initializes a new instance of the ModuleActionCollection class. Initializes a new, empty instance of the ModuleActionCollection class.

Declaration
public ModuleActionCollection()
Remarks

The default constructor creates an empty collection of ModuleAction objects.

| Improve this Doc View Source

ModuleActionCollection(ModuleAction[])

Initializes a new instance of the ModuleActionCollection class containing the specified array of ModuleAction objects.

Declaration
public ModuleActionCollection(ModuleAction[] value)
Parameters
Type Name Description
ModuleAction[] value

An array of ModuleAction objects with which to initialize the collection.

Remarks

This overloaded constructor copies the ModuleActions from the indicated array.

| Improve this Doc View Source

ModuleActionCollection(ModuleActionCollection)

Initializes a new instance of the ModuleActionCollection class containing the elements of the specified source collection.

Declaration
public ModuleActionCollection(ModuleActionCollection value)
Parameters
Type Name Description
ModuleActionCollection value

A ModuleActionCollection with which to initialize the collection.

Remarks

This overloaded constructor copies the ModuleActions from the indicated collection.

Properties

| Improve this Doc View Source

Item[Int32]

Gets or sets the ModuleActionCollection at the specified index in the collection.

In VB.Net, this property is the indexer for the ModuleActionCollection class.

Declaration
public ModuleAction this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index

The index of the collection to access.

Property Value
Type Description
ModuleAction

A ModuleAction at each valid index.

Remarks

This method is an indexer that can be used to access the collection.

Methods

| Improve this Doc View Source

Add(ModuleAction)

Add an element of the specified ModuleAction to the end of the collection.

Declaration
public int Add(ModuleAction value)
Parameters
Type Name Description
ModuleAction value

An object of type ModuleAction to add to the collection.

Returns
Type Description
System.Int32

The index of the newly added ModuleAction.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

| Improve this Doc View Source

Add(Int32, String, String, String, String, String, Boolean, SecurityAccessLevel, Boolean, Boolean)

Add an element of the specified ModuleAction to the end of the collection.

Declaration
public ModuleAction Add(int iD, string title, string cmdName, string cmdArg, string icon, string url, bool useActionEvent, SecurityAccessLevel secure, bool visible, bool newWindow)
Parameters
Type Name Description
System.Int32 iD

This is the identifier to use for this action.

System.String title

This is the title that will be displayed for this action.

System.String cmdName

The command name passed to the client when this action is clicked.

System.String cmdArg

The command argument passed to the client when this action is clicked.

System.String icon

The URL of the Icon to place next to this action.

System.String url

The destination URL to redirect the client browser when this action is clicked.

System.Boolean useActionEvent

Determines whether client will receive an event notification.

SecurityAccessLevel secure

The security access level required for access to this action.

System.Boolean visible

Whether this action will be displayed.

System.Boolean newWindow

Whether open in new window.

Returns
Type Description
ModuleAction

The index of the newly added ModuleAction.

Remarks

This method creates a new ModuleAction with the specified values, adds it to the collection and returns the index of the newly created ModuleAction.

| Improve this Doc View Source

Add(Int32, String, String, String, String, String, String, Boolean, SecurityAccessLevel, Boolean, Boolean)

Add an element of the specified ModuleAction to the end of the collection.

Declaration
public ModuleAction Add(int iD, string title, string cmdName, string cmdArg, string icon, string url, string clientScript, bool useActionEvent, SecurityAccessLevel secure, bool visible, bool newWindow)
Parameters
Type Name Description
System.Int32 iD

This is the identifier to use for this action.

System.String title

This is the title that will be displayed for this action.

System.String cmdName

The command name passed to the client when this action is clicked.

System.String cmdArg

The command argument passed to the client when this action is clicked.

System.String icon

The URL of the Icon to place next to this action.

System.String url

The destination URL to redirect the client browser when this action is clicked.

System.String clientScript

Client side script to be run when the this action is clicked.

System.Boolean useActionEvent

Determines whether client will receive an event notification.

SecurityAccessLevel secure

The security access level required for access to this action.

System.Boolean visible

Whether this action will be displayed.

System.Boolean newWindow

Whether open in new window.

Returns
Type Description
ModuleAction

The index of the newly added ModuleAction.

Remarks

This method creates a new ModuleAction with the specified values, adds it to the collection and returns the index of the newly created ModuleAction.

| Improve this Doc View Source

Add(Int32, String, String)

Add an element of the specified ModuleAction to the end of the collection.

Declaration
public ModuleAction Add(int iD, string title, string cmdName)
Parameters
Type Name Description
System.Int32 iD

This is the identifier to use for this action.

System.String title

This is the title that will be displayed for this action.

System.String cmdName

The command name passed to the client when this action is clicked.

Returns
Type Description
ModuleAction

The index of the newly added ModuleAction.

Remarks

This method creates a new ModuleAction with the specified values, adds it to the collection and returns the index of the newly created ModuleAction.

| Improve this Doc View Source

AddRange(ModuleAction[])

Copies the elements of the specified ModuleAction array to the end of the collection.

Declaration
public void AddRange(ModuleAction[] value)
Parameters
Type Name Description
ModuleAction[] value

An array of type ModuleAction containing the objects to add to the collection.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

| Improve this Doc View Source

AddRange(ModuleActionCollection)

Adds the contents of another ModuleActionCollection to the end of the collection.

Declaration
public void AddRange(ModuleActionCollection value)
Parameters
Type Name Description
ModuleActionCollection value

A ModuleActionCollection containing the objects to add to the collection.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

| Improve this Doc View Source

Contains(ModuleAction)

Gets a value indicating whether the collection contains the specified ModuleAction.

Declaration
public bool Contains(ModuleAction value)
Parameters
Type Name Description
ModuleAction value

The ModuleAction to search for in the collection.

Returns
Type Description
System.Boolean

true if the collection contains the specified object; otherwise, false.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

Examples
' Tests for the presence of a ModuleAction in the
' collection, and retrieves its index if it is found.
Dim testModuleAction = New ModuleAction(5, "Edit Action", "Edit")
Dim itemIndex As Integer = -1
If collection.Contains(testModuleAction) Then
   itemIndex = collection.IndexOf(testModuleAction)
End If
| Improve this Doc View Source

GetActionByCommandName(String)

Represents a collection of ModuleAction objects.

Declaration
public ModuleAction GetActionByCommandName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
ModuleAction
Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

| Improve this Doc View Source

GetActionByID(Int32)

Represents a collection of ModuleAction objects.

Declaration
public ModuleAction GetActionByID(int id)
Parameters
Type Name Description
System.Int32 id
Returns
Type Description
ModuleAction
Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

| Improve this Doc View Source

GetActionsByCommandName(String)

Represents a collection of ModuleAction objects.

Declaration
public ModuleActionCollection GetActionsByCommandName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
ModuleActionCollection
Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

| Improve this Doc View Source

IndexOf(ModuleAction)

Gets the index in the collection of the specified ModuleActionCollection, if it exists in the collection.

Declaration
public int IndexOf(ModuleAction value)
Parameters
Type Name Description
ModuleAction value

The ModuleAction to locate in the collection.

Returns
Type Description
System.Int32

The index in the collection of the specified object, if found; otherwise, -1.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

Examples

This example tests for the presense of a ModuleAction in the collection, and retrieves its index if it is found.

  Dim testModuleAction = New ModuleAction(5, "Edit Action", "Edit")
  Dim itemIndex As Integer = -1
  If collection.Contains(testModuleAction) Then
    itemIndex = collection.IndexOf(testModuleAction)
  End If
| Improve this Doc View Source

Insert(Int32, ModuleAction)

Add an element of the specified ModuleAction to the collection at the designated index.

Declaration
public void Insert(int index, ModuleAction value)
Parameters
Type Name Description
System.Int32 index

An system.int32 to indicate the location to add the object to the collection.

ModuleAction value

An object of type ModuleAction to add to the collection.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

Examples
' Inserts a ModuleAction at index 0 of the collection.
collection.Insert(0, New ModuleAction(5, "Edit Action", "Edit"))
| Improve this Doc View Source

Remove(ModuleAction)

Remove the specified object of type ModuleAction from the collection.

Declaration
public void Remove(ModuleAction value)
Parameters
Type Name Description
ModuleAction value

An object of type ModuleAction to remove from the collection.

Remarks

The ModuleActionCollection is a custom collection of ModuleActions. Each ModuleAction in the collection has it's own DotNetNuke.ModuleAction.Actions collection which provides the ability to create a hierarchy of ModuleActions.

Examples
' Removes the specified ModuleAction from the collection.
Dim testModuleAction = New ModuleAction(5, "Edit Action", "Edit")
collection.Remove(testModuleAction)

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS