Search Results for

    Show / Hide Table of Contents
    View Source

    Class Element

    Represents an Element object

    Inheritance
    object
    BeingDirtyBase
    EntityBase
    TreeEntityBase
    ContentBase
    PublishableContentBase
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(IsReference = true)]
    public class Element : PublishableContentBase, IElement, IPublishableContentBase, IContentBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    Element(string, int, IContentType, int, string?)

    Constructor for creating an Element object

    Declaration
    public Element(string name, int parentId, IContentType contentType, int userId, string? culture = null)
    Parameters
    Type Name Description
    string name

    Name of the element

    int parentId

    Id of the Parent folder

    IContentType contentType

    ContentType for the current Element object

    int userId

    The identifier of the user creating the Element object

    string culture

    An optional culture.

    View Source

    Element(string, int, IContentType?, string?)

    Constructor for creating an Element object

    Declaration
    public Element(string name, int parentId, IContentType? contentType, string? culture = null)
    Parameters
    Type Name Description
    string name

    Name of the element

    int parentId

    Id of the Parent folder

    IContentType contentType

    ContentType for the current Element object

    string culture

    An optional culture.

    View Source

    Element(string, int, IContentType?, PropertyCollection, string?)

    Constructor for creating an Element object

    Declaration
    public Element(string name, int parentId, IContentType? contentType, PropertyCollection properties, string? culture = null)
    Parameters
    Type Name Description
    string name

    Name of the element

    int parentId

    Id of the Parent folder

    IContentType contentType

    ContentType for the current Element object

    PropertyCollection properties

    Collection of properties

    string culture

    An optional culture.

    View Source

    Element(string, IContentType, int, string?)

    Constructor for creating an Element object

    Declaration
    public Element(string name, IContentType contentType, int userId, string? culture = null)
    Parameters
    Type Name Description
    string name

    Name of the element

    IContentType contentType

    ContentType for the current Element object

    int userId

    The identifier of the user creating the Element object

    string culture

    An optional culture.

    View Source

    Element(string, IContentType, string?)

    Constructor for creating an Element object

    Declaration
    public Element(string name, IContentType contentType, string? culture = null)
    Parameters
    Type Name Description
    string name

    Name of the element

    IContentType contentType

    ContentType for the current Element object

    string culture

    An optional culture.

    View Source

    Element(string, IContentType, PropertyCollection, string?)

    Constructor for creating an Element object

    Declaration
    public Element(string name, IContentType contentType, PropertyCollection properties, string? culture = null)
    Parameters
    Type Name Description
    string name

    Name of the element

    IContentType contentType

    ContentType for the current Element object

    PropertyCollection properties

    Collection of properties

    string culture

    An optional culture.

    Methods

    View Source

    DeepCloneWithResetIdentities()

    Creates a deep clone of the current entity with its identity and it's property identities reset

    Declaration
    public IElement DeepCloneWithResetIdentities()
    Returns
    Type Description
    IElement
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX