Represents the content type that a Content object is based on
InheritanceSystem.Object
Namespace: Umbraco.Cms.Core.Models Assembly: Umbraco.Core.dll Syntax[DataContract(IsReference = true)]
public class ContentType : ContentTypeCompositionBase, IContentType, IContentTypeComposition, IContentTypeBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors View Source ContentType(IShortStringHelper, Int32)
Constuctor for creating a ContentType with the parent's id.
Declarationpublic ContentType(IShortStringHelper shortStringHelper, int parentId)
Parameters View Source ContentType(IShortStringHelper, IContentType, String)
Constuctor for creating a ContentType with the parent as an inherited type.
Declarationpublic ContentType(IShortStringHelper shortStringHelper, IContentType parent, string alias)
Parameters Fields View Source SupportsPublishingConst Declaration
public const bool SupportsPublishingConst = true
Field Value Type Description System.Boolean Properties View Source AllowedTemplates
Gets or Sets a list of Templates which are allowed for the ContentType TODO: This should be ignored from cloning!!!!!!!!!!!!!!
[DataMember]
public IEnumerable<ITemplate>? AllowedTemplates { get; set; }
Property Value Type Description System.Nullable<IEnumerable<ITemplate>> View Source DefaultTemplate
Gets or sets the alias of the default Template. TODO: This should be ignored from cloning!!!!!!!!!!!!!!
[IgnoreDataMember]
public ITemplate DefaultTemplate { get; }
Property Value View Source DefaultTemplateId Declaration
[DataMember]
public int DefaultTemplateId { get; set; }
Property Value Type Description System.Int32 View Source HistoryCleanup Declaration
public HistoryCleanup HistoryCleanup { get; set; }
Property Value View Source SupportsPublishing
Gets a value indicating whether the content type supports publishing.
Declarationpublic override bool SupportsPublishing { get; }
Property Value Type Description System.Boolean Methods View Source IsAllowedTemplate(Int32)
Determines if AllowedTemplates contains templateId
Declarationpublic bool IsAllowedTemplate(int templateId)
Parameters Type Name Description System.Int32 templateId
The template id to check
Returns Type Description System.BooleanTrue if AllowedTemplates contains the templateId else False
View Source IsAllowedTemplate(String)Determines if AllowedTemplates contains templateId
Declarationpublic bool IsAllowedTemplate(string templateAlias)
Parameters Type Name Description System.String templateAlias
The template alias to check
Returns Type Description System.BooleanTrue if AllowedTemplates contains the templateAlias else False
View Source IsDirty()Indicates whether the current entity is dirty.
Declarationpublic override bool IsDirty()
Returns Type Description System.Boolean
True if entity is dirty, otherwise False
View Source RemoveTemplate(ITemplate)Removes a template from the list of allowed templates
Declarationpublic bool RemoveTemplate(ITemplate template)
Parameters Returns Type Description System.Boolean
True if template was removed, otherwise False
View Source SetDefaultTemplate(ITemplate)Sets the default template for the ContentType
Declarationpublic void SetDefaultTemplate(ITemplate template)
Parameters View Source ToSimple()
Gets an ISimpleContentType corresponding to this content type.
Declarationpublic override ISimpleContentType ToSimple()
Returns Explicit Interface Implementations View Source IContentType.DeepCloneWithResetIdentities(String)
Creates a deep clone of the current entity with its identity/alias and it's property identities reset
DeclarationIContentType IContentType.DeepCloneWithResetIdentities(string newAlias)
Parameters Type Name Description System.String newAlias Returns
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4