Interface ITreeEntity
Defines an entity that belongs to a tree.
Namespace: Umbraco.Core.Models.Entities
Assembly: Umbraco.Core.dll
Syntax
public interface ITreeEntity : IEntity, IDeepCloneable
Properties
View SourceCreatorId
Gets or sets the identifier of the user who created this entity.
Declaration
int CreatorId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Level
Gets or sets the level of the entity.
Declaration
int Level { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Name
Gets or sets the name of the entity.
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ParentId
Gets or sets the identifier of the parent entity.
Declaration
int ParentId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Path
Gets or sets the path to the entity.
Declaration
string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SortOrder
Gets or sets the sort order of the entity.
Declaration
int SortOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Trashed
Gets a value indicating whether this entity is trashed.
Declaration
bool Trashed { get; }
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
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.