Interface IContentTypeComposition
Defines the Composition of a ContentType
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public interface IContentTypeComposition : IContentTypeBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Properties
View SourceCompositionPropertyGroups
Gets the property groups for the entire composition.
Declaration
IEnumerable<PropertyGroup> CompositionPropertyGroups { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyGroup> |
CompositionPropertyTypes
Gets the property types for the entire composition.
Declaration
IEnumerable<PropertyType> CompositionPropertyTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyType> |
ContentTypeComposition
Gets or sets the content types that compose this content type.
Declaration
IEnumerable<IContentTypeComposition> ContentTypeComposition { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IContentTypeComposition> |
Methods
View SourceAddContentType(IContentTypeComposition)
Adds a new ContentType to the list of composite ContentTypes
Declaration
bool AddContentType(IContentTypeComposition contentType)
Parameters
Type | Name | Description |
---|---|---|
IContentTypeComposition | contentType | IContentType to add |
Returns
Type | Description |
---|---|
System.Boolean | True if ContentType was added, otherwise returns False |
CompositionAliases()
Gets a list of ContentType aliases from the current composition
Declaration
IEnumerable<string> CompositionAliases()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumerable list of string aliases |
CompositionIds()
Gets a list of ContentType Ids from the current composition
Declaration
IEnumerable<int> CompositionIds()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Int32> | An enumerable list of integer ids |
ContentTypeCompositionExists(String)
Checks if a ContentType with the supplied alias exists in the list of composite ContentTypes
Declaration
bool ContentTypeCompositionExists(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | Alias of a IContentType |
Returns
Type | Description |
---|---|
System.Boolean | True if ContentType with alias exists, otherwise returns False |
RemoveContentType(String)
Removes a ContentType with the supplied alias from the list of composite ContentTypes
Declaration
bool RemoveContentType(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | Alias of a IContentType |
Returns
Type | Description |
---|---|
System.Boolean | True if ContentType was removed, otherwise returns False |