Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublishedContentType

    Represents an IPublishedElement type.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Models.PublishedContent
    Assembly: Umbraco.Core.dll
    Syntax
    public class PublishedContentType : IPublishedContentType
    Remarks

    Instances of the PublishedContentType class are immutable, ie if the content type changes, then a new class needs to be created.

    Constructors

    View Source

    PublishedContentType(Guid, Int32, String, PublishedItemType, IEnumerable<String>, Func<IPublishedContentType, IEnumerable<IPublishedPropertyType>>, ContentVariation, Boolean)

    This constructor is for tests and is not intended to be used directly from application code.

    Declaration
    public PublishedContentType(Guid key, int id, string alias, PublishedItemType itemType, IEnumerable<string> compositionAliases, Func<IPublishedContentType, IEnumerable<IPublishedPropertyType>> propertyTypes, ContentVariation variations, bool isElement = false)
    Parameters
    Type Name Description
    Guid key
    System.Int32 id
    System.String alias
    PublishedItemType itemType
    IEnumerable<System.String> compositionAliases
    Func<IPublishedContentType, IEnumerable<IPublishedPropertyType>> propertyTypes
    ContentVariation variations
    System.Boolean isElement
    Remarks

    Values are assumed to be consistent and are not checked.

    View Source

    PublishedContentType(Guid, Int32, String, PublishedItemType, IEnumerable<String>, IEnumerable<PublishedPropertyType>, ContentVariation, Boolean)

    This constructor is for tests and is not intended to be used directly from application code.

    Declaration
    public PublishedContentType(Guid key, int id, string alias, PublishedItemType itemType, IEnumerable<string> compositionAliases, IEnumerable<PublishedPropertyType> propertyTypes, ContentVariation variations, bool isElement = false)
    Parameters
    Type Name Description
    Guid key
    System.Int32 id
    System.String alias
    PublishedItemType itemType
    IEnumerable<System.String> compositionAliases
    IEnumerable<PublishedPropertyType> propertyTypes
    ContentVariation variations
    System.Boolean isElement
    Remarks

    Values are assumed to be consistent and are not checked.

    View Source

    PublishedContentType(IContentTypeComposition, IPublishedContentTypeFactory)

    Initializes a new instance of the PublishedContentType class with a content type.

    Declaration
    public PublishedContentType(IContentTypeComposition contentType, IPublishedContentTypeFactory factory)
    Parameters
    Type Name Description
    IContentTypeComposition contentType
    IPublishedContentTypeFactory factory

    Properties

    View Source

    Alias

    Gets the content type alias.

    Declaration
    public string Alias { get; }
    Property Value
    Type Description
    System.String
    View Source

    CompositionAliases

    Gets the aliases of the content types participating in the composition.

    Declaration
    public HashSet<string> CompositionAliases { get; }
    Property Value
    Type Description
    HashSet<System.String>
    View Source

    Id

    Gets the content type identifier.

    Declaration
    public int Id { get; }
    Property Value
    Type Description
    System.Int32
    View Source

    IsElement

    Gets a value indicating whether this content type is for an element.

    Declaration
    public bool IsElement { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    ItemType

    Gets the content item type.

    Declaration
    public PublishedItemType ItemType { get; }
    Property Value
    Type Description
    PublishedItemType
    View Source

    Key

    Gets the unique key for the content type.

    Declaration
    public Guid Key { get; }
    Property Value
    Type Description
    Guid
    View Source

    PropertyTypes

    Gets the content type properties.

    Declaration
    public IEnumerable<IPublishedPropertyType> PropertyTypes { get; }
    Property Value
    Type Description
    IEnumerable<IPublishedPropertyType>
    View Source

    Variations

    Gets the content variations of the content type.

    Declaration
    public ContentVariation Variations { get; }
    Property Value
    Type Description
    ContentVariation

    Methods

    View Source

    GetPropertyIndex(String)

    Gets a property type index.

    Declaration
    public int GetPropertyIndex(string alias)
    Parameters
    Type Name Description
    System.String alias
    Returns
    Type Description
    System.Int32
    Remarks

    The alias is case-insensitive. This is the only place where alias strings are compared.

    View Source

    GetPropertyType(Int32)

    Gets a property type.

    Declaration
    public virtual IPublishedPropertyType GetPropertyType(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    IPublishedPropertyType
    View Source

    GetPropertyType(String)

    Gets a property type.

    Declaration
    public virtual IPublishedPropertyType GetPropertyType(string alias)
    Parameters
    Type Name Description
    System.String alias
    Returns
    Type Description
    IPublishedPropertyType
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PublishedContentType(Guid, Int32, String, PublishedItemType, IEnumerable<String>, Func<IPublishedContentType, IEnumerable<IPublishedPropertyType>>, ContentVariation, Boolean)
      • PublishedContentType(Guid, Int32, String, PublishedItemType, IEnumerable<String>, IEnumerable<PublishedPropertyType>, ContentVariation, Boolean)
      • PublishedContentType(IContentTypeComposition, IPublishedContentTypeFactory)
    • Properties
      • Alias
      • CompositionAliases
      • Id
      • IsElement
      • ItemType
      • Key
      • PropertyTypes
      • Variations
    • Methods
      • GetPropertyIndex(String)
      • GetPropertyType(Int32)
      • GetPropertyType(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX