View Source
Class EntityTreeControllerBase<TItem>
Inheritance
System.Object
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public abstract class EntityTreeControllerBase<TItem> : ManagementApiControllerBase where TItem : EntityTreeItemResponseModel, new()
Type Parameters
Constructors
View Source
EntityTreeControllerBase(IEntityService)
Declaration
protected EntityTreeControllerBase(IEntityService entityService)
Parameters
Type |
Name |
Description |
IEntityService |
entityService |
|
Properties
View Source
EntityService
Declaration
protected IEntityService EntityService { get; }
Property Value
Type |
Description |
IEntityService |
|
View Source
ItemObjectType
Declaration
protected abstract UmbracoObjectTypes ItemObjectType { get; }
Property Value
Type |
Description |
UmbracoObjectTypes |
|
View Source
ItemOrdering
Declaration
protected virtual Ordering ItemOrdering { get; }
Property Value
Type |
Description |
Ordering |
|
Methods
View Source
GetAncestorEntitiesAsync(Guid, Boolean)
Declaration
protected virtual async Task<IEntitySlim[]> GetAncestorEntitiesAsync(Guid descendantKey, bool includeSelf)
Parameters
Type |
Name |
Description |
Guid |
descendantKey |
|
System.Boolean |
includeSelf |
|
Returns
Type |
Description |
Task<IEntitySlim[]> |
|
View Source
GetAncestors(Guid, Boolean)
Declaration
protected virtual async Task<ActionResult<IEnumerable<TItem>>> GetAncestors(Guid descendantKey, bool includeSelf = true)
Parameters
Type |
Name |
Description |
Guid |
descendantKey |
|
System.Boolean |
includeSelf |
|
Returns
Type |
Description |
Task<ActionResult<IEnumerable<TItem>>> |
|
View Source
GetChildren(Guid, Int32, Int32)
Declaration
protected async Task<ActionResult<PagedViewModel<TItem>>> GetChildren(Guid parentId, int skip, int take)
Parameters
Type |
Name |
Description |
Guid |
parentId |
|
System.Int32 |
skip |
|
System.Int32 |
take |
|
Returns
View Source
GetPagedChildEntities(Guid, Int32, Int32, out Int64)
Declaration
protected virtual IEntitySlim[] GetPagedChildEntities(Guid parentKey, int skip, int take, out long totalItems)
Parameters
Type |
Name |
Description |
Guid |
parentKey |
|
System.Int32 |
skip |
|
System.Int32 |
take |
|
System.Int64 |
totalItems |
|
Returns
Type |
Description |
IEntitySlim[] |
|
View Source
GetPagedRootEntities(Int32, Int32, out Int64)
Declaration
protected virtual IEntitySlim[] GetPagedRootEntities(int skip, int take, out long totalItems)
Parameters
Type |
Name |
Description |
System.Int32 |
skip |
|
System.Int32 |
take |
|
System.Int64 |
totalItems |
|
Returns
Type |
Description |
IEntitySlim[] |
|
View Source
GetRoot(Int32, Int32)
Declaration
protected async Task<ActionResult<PagedViewModel<TItem>>> GetRoot(int skip, int take)
Parameters
Type |
Name |
Description |
System.Int32 |
skip |
|
System.Int32 |
take |
|
Returns
View Source
MapTreeItemViewModel(Nullable<Guid>, IEntitySlim)
Declaration
protected virtual TItem MapTreeItemViewModel(Guid? parentKey, IEntitySlim entity)
Parameters
Type |
Name |
Description |
System.Nullable<Guid> |
parentKey |
|
IEntitySlim |
entity |
|
Returns
View Source
MapTreeItemViewModels(Nullable<Guid>, IEntitySlim[])
Declaration
protected virtual TItem[] MapTreeItemViewModels(Guid? parentKey, IEntitySlim[] entities)
Parameters
Type |
Name |
Description |
System.Nullable<Guid> |
parentKey |
|
IEntitySlim[] |
entities |
|
Returns
View Source
PagedViewModel(IEnumerable<TItem>, Int64)
Declaration
protected PagedViewModel<TItem> PagedViewModel(IEnumerable<TItem> treeItemViewModels, long totalItems)
Parameters
Type |
Name |
Description |
IEnumerable<TItem> |
treeItemViewModels |
|
System.Int64 |
totalItems |
|
Returns