Search Results for

    Show / Hide Table of Contents
    View Source

    Class TypeModel

    Represents a model.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Infrastructure.ModelsBuilder.Building
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class TypeModel

    Fields

    View Source

    Alias

    Gets the alias of the model.

    Declaration
    public string Alias
    Field Value
    Type Description
    System.String
    View Source

    BaseType

    Gets the base model.

    Declaration
    public TypeModel BaseType
    Field Value
    Type Description
    TypeModel
    Remarks

    If the content type does not have a base content type, then returns null.

    The current model inherits from its base model.

    View Source

    ClrName

    Gets the clr name of the model.

    Declaration
    public string ClrName
    Field Value
    Type Description
    System.String
    Remarks

    This is the complete name eg "Foo.Bar.MyContent".

    View Source

    DeclaringInterfaces

    Gets the list of interfaces that this model needs to declare it implements.

    Declaration
    public readonly List<TypeModel> DeclaringInterfaces
    Field Value
    Type Description
    List<TypeModel>
    Remarks

    Some of these interfaces may actually be implemented by a base model that this model inherits from.

    View Source

    Description

    Gets the description of the content type.

    Declaration
    public string Description
    Field Value
    Type Description
    System.String
    View Source

    HasBase

    Gets a value indicating whether this model has a base class.

    Declaration
    public bool HasBase
    Field Value
    Type Description
    System.Boolean
    Remarks

    Can be either because the content type has a base content type declared in Umbraco, or because the existing user's code declares a base class for this model.

    View Source

    Id

    Gets the unique identifier of the corresponding content type.

    Declaration
    public int Id
    Field Value
    Type Description
    System.Int32
    View Source

    ImplementingInterfaces

    Gets the list of interfaces that this model needs to actually implement.

    Declaration
    public readonly List<TypeModel> ImplementingInterfaces
    Field Value
    Type Description
    List<TypeModel>
    View Source

    IsMixin

    Gets a value indicating whether this model is used as a mixin by another model.

    Declaration
    public bool IsMixin
    Field Value
    Type Description
    System.Boolean
    View Source

    IsParent

    Gets a value indicating whether this model is the base model of another model.

    Declaration
    public bool IsParent
    Field Value
    Type Description
    System.Boolean
    View Source

    MixinTypes

    Gets the mixin models.

    Declaration
    public readonly List<TypeModel> MixinTypes
    Field Value
    Type Description
    List<TypeModel>
    Remarks

    The current model implements mixins.

    View Source

    Name

    Gets the name of the content type.

    Declaration
    public string Name
    Field Value
    Type Description
    System.String
    View Source

    ParentId

    Gets the unique identifier of the parent.

    Declaration
    public int ParentId
    Field Value
    Type Description
    System.Int32
    Remarks

    The parent can either be a base content type, or a content types container. If the content type does not have a base content type, then returns -1.

    View Source

    Properties

    Gets the list of properties that are defined by this model.

    Declaration
    public readonly List<PropertyModel> Properties
    Field Value
    Type Description
    List<PropertyModel>
    Remarks

    These are only those property that are defined locally by this model, and the list does not contain properties inherited from base models or from mixins.

    Properties

    View Source

    IsElement

    Gets a value indicating whether the type is an element.

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

    ItemType

    Gets or sets the model item type.

    Declaration
    public TypeModel.ItemTypes ItemType { get; set; }
    Property Value
    Type Description
    TypeModel.ItemTypes

    Methods

    View Source

    EnumerateBaseTypes(Boolean)

    Enumerates the base models starting from the current model up.

    Declaration
    public IEnumerable<TypeModel> EnumerateBaseTypes(bool andSelf = false)
    Parameters
    Type Name Description
    System.Boolean andSelf

    Indicates whether the enumeration should start with the current model or from its base model.

    Returns
    Type Description
    IEnumerable<TypeModel>

    The base models.

    View Source

    MapModelTypes(IList<TypeModel>, String)

    Maps ModelType.

    Declaration
    public static void MapModelTypes(IList<TypeModel> typeModels, string ns)
    Parameters
    Type Name Description
    IList<TypeModel> typeModels
    System.String ns
    • Improve this Doc
    • View Source
    In This Article
    • Fields
      • Alias
      • BaseType
      • ClrName
      • DeclaringInterfaces
      • Description
      • HasBase
      • Id
      • ImplementingInterfaces
      • IsMixin
      • IsParent
      • MixinTypes
      • Name
      • ParentId
      • Properties
    • Properties
      • IsElement
      • ItemType
    • Methods
      • EnumerateBaseTypes(Boolean)
      • MapModelTypes(IList<TypeModel>, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX