Class TreeEntityBase
Provides a base class for tree entities.
Namespace: Umbraco.Core.Models.Entities
Assembly: Umbraco.Core.dll
Syntax
public abstract class TreeEntityBase : EntityBase, IRememberBeingDirty, ICanBeDirty, ITreeEntity, IEntity, IDeepCloneable
Properties
View SourceCreatorId
Gets or sets the identifier of the user who created this entity.
Declaration
[DataMember]
public int CreatorId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Level
Gets or sets the level of the entity.
Declaration
[DataMember]
public int Level { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Name
Gets or sets the name of the entity.
Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ParentId
Gets or sets the identifier of the parent entity.
Declaration
[DataMember]
public int ParentId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Path
Gets or sets the path to the entity.
Declaration
[DataMember]
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SortOrder
Gets or sets the sort order of the entity.
Declaration
[DataMember]
public int SortOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Trashed
Gets a value indicating whether this entity is trashed.
Declaration
[DataMember]
public bool Trashed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Trashed entities are located in the recycle bin.
Always false for entities that do not support being trashed.
Methods
View SourceSetParent(ITreeEntity)
Sets the parent entity.
Declaration
public void SetParent(ITreeEntity parent)
Parameters
Type | Name | Description |
---|---|---|
ITreeEntity | parent |
Remarks
Use this method to set the parent entity when the parent entity is known, but has not been persistent and does not yet have an identity. The parent identifier will be retrieved from the parent entity when needed. If the parent entity still does not have an entity by that time, an exception will be thrown by ParentId getter.