Class TabDefinition
Read and save tab information
Inheritance
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class TabDefinition : IReadOnly<TabDefinition>, IReadOnly
Constructors
TabDefinition()
Initializes a new instance of the TabDefinition class.
Declaration
public TabDefinition()
TabDefinition(Int32, String)
Initializes a new instance of the TabDefinition class.
Declaration
public TabDefinition(int id, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The identifier for the TabDefinition. |
System.String | name | The name of the TabDefinition. |
TabDefinition(Int32, String, AccessLevel, Int32, Boolean)
Initializes a new instance of the TabDefinition class.
Declaration
public TabDefinition(int id, string name, AccessLevel access, int sortIndex, bool isSystemTabDefinition)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The identifier for the TabDefinition. |
System.String | name | The name of the TabDefinition. |
AccessLevel | access | Specifies the associated access level for the tab. |
System.Int32 | sortIndex | Sort index for the TabDefinition. |
System.Boolean | isSystemTabDefinition | if set to |
TabDefinition(Int32, String, AccessLevel, Int32, Boolean, LocalizationService)
Initializes a new instance of the TabDefinition class.
Declaration
public TabDefinition(int id, string name, AccessLevel access, int sortIndex, bool isSystemTabDefinition, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The identifier for the TabDefinition. |
System.String | name | The name of the TabDefinition. |
AccessLevel | access | Specifies the associated access level for the tab. |
System.Int32 | sortIndex | Sort index for the TabDefinition. |
System.Boolean | isSystemTabDefinition | if set to |
LocalizationService | localizationService | The resource locator that should be used by the instance to get localized strings. |
Properties
DisplayName
The display name of the data type
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ID
The unique identifier of type
Declaration
public int ID { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSystemTab
If a system defined tab or not
Declaration
public bool IsSystemTab { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalizedName
The localized name of the tab
Declaration
public string LocalizedName { get; }
Property Value
Type | Description |
---|---|
System.String |
Name
The name of the data type
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RequiredAccess
The required access for this tab
Declaration
public AccessLevel RequiredAccess { get; set; }
Property Value
Type | Description |
---|---|
AccessLevel |
SortIndex
The relative sort index
Declaration
public int SortIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
ClearCache()
Clears the cache of TabDefinition.
Declaration
[Obsolete("The tab definition does not take responsibility for other components cache handling. Instead, they should listen to the events on TabDefinitionRepository and handle their own cache", false)]
public static void ClearCache()
CreateWritableClone()
Declaration
public TabDefinition CreateWritableClone()
Returns
Type | Description |
---|---|
TabDefinition |
Delete()
Delete tab
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public void Delete()
Delete(Int32)
Delete tab
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public void Delete(int replaceWithTabDefinition)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | replaceWithTabDefinition | Replace existing references with tab |
GetDependentPropertyNames(Int32)
List all dependent properties for a specified tab
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public static string[] GetDependentPropertyNames(int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId | The key for the tab |
Returns
Type | Description |
---|---|
System.String[] | A string array of all property names found on the specified tab |
List()
List all defined types
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public static TabDefinitionCollection List()
Returns
Type | Description |
---|---|
TabDefinitionCollection | A collection of types |
Load(Int32)
Load a tab based on identifier
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public static TabDefinition Load(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The tab identifier |
Returns
Type | Description |
---|---|
TabDefinition | A tab or null if not found |
Load(String)
Load a tab based on name
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public static TabDefinition Load(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The tab name |
Returns
Type | Description |
---|---|
TabDefinition | A tab or null if not found |
MakeReadOnly()
Declaration
public void MakeReadOnly()
Save()
Save changes to type
Declaration
[Obsolete("Use ITabDefinitionRepository instead", false)]
public void Save()
ThrowIfReadOnly()
Declaration
protected virtual void ThrowIfReadOnly()
Explicit Interface Implementations
IReadOnly.CreateWritableClone()
Declaration
object IReadOnly.CreateWritableClone()
Returns
Type | Description |
---|---|
System.Object |