Class TabVersionSettings
Inheritance
Implements
Inherited Members
Namespace: DotNetNuke.Entities.Tabs.TabVersions
Assembly: DotNetNuke.dll
Syntax
public class TabVersionSettings : ServiceLocator<ITabVersionSettings, TabVersionSettings>, ITabVersionSettings
Methods
| Improve this Doc View SourceGetFactory()
Gets the service locator factory.
Declaration
protected override Func<ITabVersionSettings> GetFactory()
Returns
Type | Description |
---|---|
Func<ITabVersionSettings> | A factory function. |
Overrides
GetMaxNumberOfVersions(Int32)
Get the maximum number of version that the portal will kept for a tab.
Declaration
public int GetMaxNumberOfVersions(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
Returns
Type | Description |
---|---|
System.Int32 | Max number of version. |
GetTabVersionQueryStringParameter(Int32)
Get the query string parameter name to especify a Tab Version using the version number (i.e.: ?version=1).
Declaration
public string GetTabVersionQueryStringParameter(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
Returns
Type | Description |
---|---|
System.String | Query string parameter name. |
IsVersioningEnabled(Int32, Int32)
Get the status of the tab versioning for an specific tab of the portal.
Declaration
public bool IsVersioningEnabled(int portalId, int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.Int32 | tabId | Tab Id to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if tab versioning is enabled for the portal and for the tab, false otherwise. |
Remarks
If versioning is disabled at portal level, the versioning for tabs will be disabled too.
IsVersioningEnabled(Int32)
Get the status of the tab versioning for the portal.
Declaration
public bool IsVersioningEnabled(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if tab versioning is enabled for the portal, false otherwise. |
SetEnabledVersioningForPortal(Int32, Boolean)
Set the status of the tab versioning for the portal.
Declaration
public void SetEnabledVersioningForPortal(int portalId, bool enabled)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.Boolean | enabled | true for enable it, false otherwise. |
SetEnabledVersioningForTab(Int32, Boolean)
Set the status of the tab versioning for a tab.
Declaration
public void SetEnabledVersioningForTab(int tabId, bool enabled)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId | Tab Id. |
System.Boolean | enabled | true for enable it, false otherwise. |
SetMaxNumberOfVersions(Int32, Int32)
Set the maximum number of version that the portal will kept for a tab.
Declaration
public void SetMaxNumberOfVersions(int portalId, int maxNumberOfVersions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.Int32 | maxNumberOfVersions | Max number of version. |