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

Interface IModuleController

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Namespace: DotNetNuke.Entities.Modules
Assembly: DotNetNuke.dll
Syntax
public interface IModuleController

Methods

| Improve this Doc View Source

AddModule(ModuleInfo)

add a module to a page.

Declaration
int AddModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

moduleInfo for the module to create.

Returns
Type Description
System.Int32

ID of the created module.

| Improve this Doc View Source

ClearCache(Int32)

Clears the module cache based on the page (tabid).

Declaration
void ClearCache(int tabId)
Parameters
Type Name Description
System.Int32 tabId

The tab id.

| Improve this Doc View Source

CopyModule(ModuleInfo, TabInfo, String, Boolean)

Copies the module to a new page.

Declaration
void CopyModule(ModuleInfo sourceModule, TabInfo destinationTab, string toPaneName, bool includeSettings)
Parameters
Type Name Description
ModuleInfo sourceModule

The source module.

TabInfo destinationTab

The destination tab.

System.String toPaneName

Name of to pane.

System.Boolean includeSettings

if set to true include settings.

| Improve this Doc View Source

CopyModules(TabInfo, TabInfo, Boolean, Boolean)

Copies all modules in source page to a new page.

Declaration
void CopyModules(TabInfo sourceTab, TabInfo destinationTab, bool asReference, bool includeAllTabsMobules)
Parameters
Type Name Description
TabInfo sourceTab

The source tab.

TabInfo destinationTab

The destination tab.

System.Boolean asReference

if set to true will use source module directly, else will create new module info by source module.

System.Boolean includeAllTabsMobules

if set to true will include modules which shown on all pages, this is used when create localized copy.

| Improve this Doc View Source

CopyModules(TabInfo, TabInfo, Boolean)

Copies all modules in source page to a new page.

Declaration
void CopyModules(TabInfo sourceTab, TabInfo destinationTab, bool asReference)
Parameters
Type Name Description
TabInfo sourceTab

The source tab.

TabInfo destinationTab

The destination tab.

System.Boolean asReference

if set to true will use source module directly, else will create new module info by source module.

| Improve this Doc View Source

CreateContentItem(ModuleInfo)

This method provides two functions:

  1. Check and ensure that the "Module" content item type exists - if not create it
  2. add a content item.
Declaration
void CreateContentItem(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

the module to add a content item for.

| Improve this Doc View Source

DeleteAllModules(Int32, Int32, List<TabInfo>, Boolean, Boolean, Boolean)

DeleteAllModules deletes all instances of a Module (from a collection). This overload soft deletes the instances.

Declaration
void DeleteAllModules(int moduleId, int tabId, List<TabInfo> fromTabs, bool softDelete, bool includeCurrent, bool deleteBaseModule)
Parameters
Type Name Description
System.Int32 moduleId

The Id of the module to copy.

System.Int32 tabId

The Id of the current tab.

List<TabInfo> fromTabs

An ArrayList of TabItem objects.

System.Boolean softDelete
System.Boolean includeCurrent
System.Boolean deleteBaseModule
| Improve this Doc View Source

DeleteModule(Int32)

Delete a module instance permanently from the database.

Declaration
void DeleteModule(int moduleId)
Parameters
Type Name Description
System.Int32 moduleId

ID of the module instance.

| Improve this Doc View Source

DeleteModuleSetting(Int32, String)

Delete a Setting of a module instance.

Declaration
void DeleteModuleSetting(int moduleId, string settingName)
Parameters
Type Name Description
System.Int32 moduleId

ID of the affected module.

System.String settingName

Name of the setting to be deleted.

| Improve this Doc View Source

DeleteTabModule(Int32, Int32, Boolean)

Delete a module reference permanently from the database. if there are no other references, the module instance is deleted as well.

Declaration
void DeleteTabModule(int tabId, int moduleId, bool softDelete)
Parameters
Type Name Description
System.Int32 tabId

ID of the page.

System.Int32 moduleId

ID of the module instance.

System.Boolean softDelete

A flag that determines whether the instance should be soft-deleted.

| Improve this Doc View Source

DeleteTabModuleSetting(Int32, String)

Delete a specific setting of a tabmodule reference.

Declaration
void DeleteTabModuleSetting(int tabModuleId, string settingName)
Parameters
Type Name Description
System.Int32 tabModuleId

ID of the affected tabmodule.

System.String settingName

Name of the setting to remove.

| Improve this Doc View Source

DeLocalizeModule(ModuleInfo)

Des the localize module.

Declaration
int DeLocalizeModule(ModuleInfo sourceModule)
Parameters
Type Name Description
ModuleInfo sourceModule

The source module.

Returns
Type Description
System.Int32

new module id.

| Improve this Doc View Source

GetAllModules()

get info of all modules in any portal of the installation.

Declaration
ArrayList GetAllModules()
Returns
Type Description
ArrayList

moduleInfo of all modules.

Remarks

created for upgrade purposes.

| Improve this Doc View Source

GetAllTabsModules(Int32, Boolean)

get Module objects of a portal, either only those, to be placed on all tabs or not.

Declaration
ArrayList GetAllTabsModules(int portalID, bool allTabs)
Parameters
Type Name Description
System.Int32 portalID

ID of the portal.

System.Boolean allTabs

specify, whether to return modules to be shown on all tabs or those to be shown on specified tabs.

Returns
Type Description
ArrayList

ArrayList of TabModuleInfo objects.

| Improve this Doc View Source

GetAllTabsModulesByModuleID(Int32)

get TabModule objects that are linked to a particular ModuleID.

Declaration
ArrayList GetAllTabsModulesByModuleID(int moduleID)
Parameters
Type Name Description
System.Int32 moduleID

ID of the module.

Returns
Type Description
ArrayList

ArrayList of TabModuleInfo objects.

| Improve this Doc View Source

GetMasterTabId(ModuleInfo)

Get the Tab ID corresponding to the initial Tab where the module was added.

Declaration
int GetMasterTabId(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

A ModuleInfo object to be checked.

Returns
Type Description
System.Int32

The Tab Id from initial Tab where the module was added.

| Improve this Doc View Source

GetModule(Int32, Int32, Boolean)

Gets the module.

Declaration
ModuleInfo GetModule(int moduleId, int tabId, bool ignoreCache)
Parameters
Type Name Description
System.Int32 moduleId

The module ID.

System.Int32 tabId

The tab ID.

System.Boolean ignoreCache

Optionally bypass the cache.

Returns
Type Description
ModuleInfo

module info.

| Improve this Doc View Source

GetModuleByCulture(Int32, Int32, Int32, Locale)

get Module by specific locale.

Declaration
ModuleInfo GetModuleByCulture(int moduleId, int tabid, int portalId, Locale locale)
Parameters
Type Name Description
System.Int32 moduleId

ID of the module.

System.Int32 tabid

ID of the tab.

System.Int32 portalId

ID of the portal.

Locale locale

The wanted locale.

Returns
Type Description
ModuleInfo

ModuleInfo associated to submitted locale.

| Improve this Doc View Source

GetModuleByDefinition(Int32, String)

Get ModuleInfo object of first module instance with a given name of the module definition.

Declaration
ModuleInfo GetModuleByDefinition(int portalId, string definitionName)
Parameters
Type Name Description
System.Int32 portalId

ID of the portal, where to look for the module.

System.String definitionName

The name of module definition (NOTE: this looks at DefinitionName, not FriendlyName).

Returns
Type Description
ModuleInfo

ModuleInfo of first module instance.

Remarks

preferably used for admin and host modules.

| Improve this Doc View Source

GetModuleByUniqueID(Guid)

get a Module object.

Declaration
ModuleInfo GetModuleByUniqueID(Guid uniqueID)
Parameters
Type Name Description
Guid uniqueID

The module's unique ID.

Returns
Type Description
ModuleInfo

The ModuleInfo instance or null.

| Improve this Doc View Source

GetModules(Int32)

get all Module objects of a portal.

Declaration
ArrayList GetModules(int portalID)
Parameters
Type Name Description
System.Int32 portalID

ID of the portal.

Returns
Type Description
ArrayList

ArrayList of ModuleInfo objects.

| Improve this Doc View Source

GetModulesByDefinition(Int32, String)

Gets the modules by definition.

Declaration
ArrayList GetModulesByDefinition(int portalID, string definitionName)
Parameters
Type Name Description
System.Int32 portalID

The portal ID.

System.String definitionName

The name of the module definition.

Returns
Type Description
ArrayList

module collection.

| Improve this Doc View Source

GetModulesByDesktopModuleId(Int32)

Gets the modules by DesktopModuleId.

Declaration
ArrayList GetModulesByDesktopModuleId(int desktopModuleId)
Parameters
Type Name Description
System.Int32 desktopModuleId

The Desktop Module Id.

Returns
Type Description
ArrayList

module collection.

| Improve this Doc View Source

GetSearchModules(Int32)

For a portal get a list of all active module and tabmodule references that are Searchable either by inheriting from ModuleSearchBase or implementing the older ISearchable interface.

Declaration
ArrayList GetSearchModules(int portalID)
Parameters
Type Name Description
System.Int32 portalID

ID of the portal to be searched.

Returns
Type Description
ArrayList

Arraylist of ModuleInfo for modules supporting search.

| Improve this Doc View Source

GetTabModule(Int32)

get a Module object.

Declaration
ModuleInfo GetTabModule(int tabModuleID)
Parameters
Type Name Description
System.Int32 tabModuleID

ID of the tabmodule.

Returns
Type Description
ModuleInfo

An ModuleInfo object.

| Improve this Doc View Source

GetTabModules(Int32)

Get all Module references on a tab.

Declaration
Dictionary<int, ModuleInfo> GetTabModules(int tabId)
Parameters
Type Name Description
System.Int32 tabId
Returns
Type Description
Dictionary<System.Int32, ModuleInfo>

Dictionary of ModuleID and ModuleInfo.

| Improve this Doc View Source

GetTabModulesByModule(Int32)

Get a list of all TabModule references of a module instance.

Declaration
IList<ModuleInfo> GetTabModulesByModule(int moduleID)
Parameters
Type Name Description
System.Int32 moduleID

ID of the Module.

Returns
Type Description
IList<ModuleInfo>

ArrayList of ModuleInfo.

| Improve this Doc View Source

InitialModulePermission(ModuleInfo, Int32, Int32)

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Declaration
void InitialModulePermission(ModuleInfo module, int tabId, int permissionType)
Parameters
Type Name Description
ModuleInfo module
System.Int32 tabId
System.Int32 permissionType
| Improve this Doc View Source

IsSharedModule(ModuleInfo)

Check if a ModuleInfo belongs to the referenced Tab or not.

Declaration
bool IsSharedModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

A ModuleInfo object to be checked.

Returns
Type Description
System.Boolean

True is TabId points to a different tab from initial Tab where the module was added. Otherwise, False.

| Improve this Doc View Source

LocalizeModule(ModuleInfo, Locale)

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Declaration
void LocalizeModule(ModuleInfo sourceModule, Locale locale)
Parameters
Type Name Description
ModuleInfo sourceModule
Locale locale
| Improve this Doc View Source

MoveModule(Int32, Int32, Int32, String)

MoveModule moes a Module from one Tab to another including all the TabModule settings.

Declaration
void MoveModule(int moduleId, int fromTabId, int toTabId, string toPaneName)
Parameters
Type Name Description
System.Int32 moduleId

The Id of the module to move.

System.Int32 fromTabId

The Id of the source tab.

System.Int32 toTabId

The Id of the destination tab.

System.String toPaneName

The name of the Pane on the destination tab where the module will end up.

| Improve this Doc View Source

RestoreModule(ModuleInfo)

Restores the module.

Declaration
void RestoreModule(ModuleInfo objModule)
Parameters
Type Name Description
ModuleInfo objModule

The module.

| Improve this Doc View Source

UpdateModule(ModuleInfo)

Update module settings and permissions in database from ModuleInfo.

Declaration
void UpdateModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

ModuleInfo of the module to update.

| Improve this Doc View Source

UpdateModuleOrder(Int32, Int32, Int32, String)

set/change the module position within a pane on a page.

Declaration
void UpdateModuleOrder(int tabId, int moduleId, int moduleOrder, string paneName)
Parameters
Type Name Description
System.Int32 tabId

ID of the page.

System.Int32 moduleId

ID of the module on the page.

System.Int32 moduleOrder

position within the controls list on page, -1 if to be added at the end.

System.String paneName

name of the pane, the module is placed in on the page.

| Improve this Doc View Source

UpdateModuleSetting(Int32, String, String)

Adds or updates a module's setting value.

Declaration
void UpdateModuleSetting(int moduleId, string settingName, string settingValue)
Parameters
Type Name Description
System.Int32 moduleId

ID of the tabmodule, the setting belongs to.

System.String settingName

name of the setting property.

System.String settingValue

value of the setting (String).

Remarks

Empty SettingValue will remove the setting.

| Improve this Doc View Source

UpdateTabModuleOrder(Int32)

set/change all module's positions within a page.

Declaration
void UpdateTabModuleOrder(int tabId)
Parameters
Type Name Description
System.Int32 tabId

ID of the page.

| Improve this Doc View Source

UpdateTabModuleSetting(Int32, String, String)

Adds or updates a tab module's setting value.

Declaration
void UpdateTabModuleSetting(int tabModuleId, string settingName, string settingValue)
Parameters
Type Name Description
System.Int32 tabModuleId

ID of the tabmodule, the setting belongs to.

System.String settingName

name of the setting property.

System.String settingValue

value of the setting (String).

Remarks

Empty SettingValue will remove the setting.

| Improve this Doc View Source

UpdateTranslationStatus(ModuleInfo, Boolean)

Updates the translation status.

Declaration
void UpdateTranslationStatus(ModuleInfo localizedModule, bool isTranslated)
Parameters
Type Name Description
ModuleInfo localizedModule

The localized module.

System.Boolean isTranslated

if set to true will mark the module as translated].

Extension Methods

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