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 SourceAddModule(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. |
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. |
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 |
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 |
System.Boolean | includeAllTabsMobules | if set to |
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 |
CreateContentItem(ModuleInfo)
This method provides two functions:
- Check and ensure that the "Module" content item type exists - if not create it
- add a content item.
Declaration
void CreateContentItem(ModuleInfo module)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | module | the module to add a content item for. |
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 |
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. |
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. |
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. |
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. |
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. |
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.
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. |
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. |
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. |
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. |
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. |
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.
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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 |
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. |
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 |
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. |
RestoreModule(ModuleInfo)
Restores the module.
Declaration
void RestoreModule(ModuleInfo objModule)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | objModule | The module. |
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. |
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. |
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.
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. |
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.
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 |