Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContentTypeComposition

    Defines the Composition of a ContentType

    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContentTypeComposition : IContentTypeBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Properties

    View Source

    CompositionPropertyGroups

    Gets the property groups for the entire composition.

    Declaration
    IEnumerable<PropertyGroup> CompositionPropertyGroups { get; }
    Property Value
    Type Description
    IEnumerable<PropertyGroup>
    View Source

    CompositionPropertyTypes

    Gets the property types for the entire composition.

    Declaration
    IEnumerable<IPropertyType> CompositionPropertyTypes { get; }
    Property Value
    Type Description
    IEnumerable<IPropertyType>
    View Source

    ContentTypeComposition

    Gets or sets the content types that compose this content type.

    Declaration
    IEnumerable<IContentTypeComposition> ContentTypeComposition { get; set; }
    Property Value
    Type Description
    IEnumerable<IContentTypeComposition>
    View Source

    RemovedContentTypes

    Returns a list of content type ids that have been removed from this instance's composition

    Declaration
    IEnumerable<int> RemovedContentTypes { get; }
    Property Value
    Type Description
    IEnumerable<System.Int32>

    Methods

    View Source

    AddContentType(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

    View Source

    CompositionAliases()

    Gets a list of ContentType aliases from the current composition

    Declaration
    IEnumerable<string> CompositionAliases()
    Returns
    Type Description
    IEnumerable<System.String>

    An enumerable list of string aliases

    View Source

    CompositionIds()

    Gets a list of ContentType Ids from the current composition

    Declaration
    IEnumerable<int> CompositionIds()
    Returns
    Type Description
    IEnumerable<System.Int32>

    An enumerable list of integer ids

    View Source

    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

    View Source

    GetOriginalComposedPropertyTypes()

    Gets the property types obtained via composition.

    Declaration
    IEnumerable<IPropertyType> GetOriginalComposedPropertyTypes()
    Returns
    Type Description
    IEnumerable<IPropertyType>
    Remarks

    Gets them raw, ie with their original variation.

    View Source

    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

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • CompositionPropertyGroups
      • CompositionPropertyTypes
      • ContentTypeComposition
      • RemovedContentTypes
    • Methods
      • AddContentType(IContentTypeComposition)
      • CompositionAliases()
      • CompositionIds()
      • ContentTypeCompositionExists(String)
      • GetOriginalComposedPropertyTypes()
      • RemoveContentType(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX