@umbraco-cms/backoffice
    Preparing search index...

    Interface UmbTreeRepository<TreeItemType, TreeRootType, TreeRootItemsRequestArgsType, TreeChildrenOfRequestArgsType, TreeAncestorsOfRequestArgsType>

    Interface for a tree repository. UmbTreeRepository

    interface UmbTreeRepository<
        TreeItemType extends UmbTreeItemModel = UmbTreeItemModel,
        TreeRootType extends UmbTreeRootModel = UmbTreeRootModel,
        TreeRootItemsRequestArgsType extends
            UmbTreeRootItemsRequestArgs = UmbTreeRootItemsRequestArgs,
        TreeChildrenOfRequestArgsType extends
            UmbTreeChildrenOfRequestArgs = UmbTreeChildrenOfRequestArgs,
        TreeAncestorsOfRequestArgsType extends
            UmbTreeAncestorsOfRequestArgs = UmbTreeAncestorsOfRequestArgs,
    > {
        createTreeItemDataResolver?: (
            host: UmbControllerHost,
            args?: UmbCreateTreeItemDataResolverArgs,
        ) => UmbTreeItemDataResolver<TreeItemType> | undefined;
        requestTreeItemAncestors: (
            args: TreeAncestorsOfRequestArgsType,
        ) => Promise<UmbRepositoryResponse<TreeItemType[]>>;
        requestTreeItemsOf: (
            args: TreeChildrenOfRequestArgsType,
        ) => Promise<
            UmbRepositoryResponseWithAsObservable<
                UmbTargetPagedModel<TreeItemType>,
                TreeItemType[],
            >,
        >;
        requestTreeRoot: () => Promise<UmbRepositoryResponse<TreeRootType>>;
        requestTreeRootItems: (
            args: TreeRootItemsRequestArgsType,
        ) => Promise<
            UmbRepositoryResponseWithAsObservable<
                UmbTargetPagedModel<TreeItemType>,
                TreeItemType[],
            >,
        >;
        rootTreeItems?: () => Promise<Observable<TreeItemType[]>>;
        treeItemsOf?: (
            parentUnique: string | null,
        ) => Promise<Observable<TreeItemType[]>>;
        destroy(): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index
    createTreeItemDataResolver?: (
        host: UmbControllerHost,
        args?: UmbCreateTreeItemDataResolverArgs,
    ) => UmbTreeItemDataResolver<TreeItemType> | undefined

    Creates an item data resolver for a tree item. Implement this to resolve names and icons that cannot be read directly off the tree item, such as variant aware document names.

    Type Declaration

    UmbTreeRepository

    requestTreeItemAncestors: (
        args: TreeAncestorsOfRequestArgsType,
    ) => Promise<UmbRepositoryResponse<TreeItemType[]>>

    Requests the ancestors of the given item.

    UmbTreeRepository

    requestTreeItemsOf: (
        args: TreeChildrenOfRequestArgsType,
    ) => Promise<
        UmbRepositoryResponseWithAsObservable<
            UmbTargetPagedModel<TreeItemType>,
            TreeItemType[],
        >,
    >

    Requests the children of the given parent item.

    UmbTreeRepository

    requestTreeRoot: () => Promise<UmbRepositoryResponse<TreeRootType>>

    Requests the root of the tree.

    UmbTreeRepository

    requestTreeRootItems: (
        args: TreeRootItemsRequestArgsType,
    ) => Promise<
        UmbRepositoryResponseWithAsObservable<
            UmbTargetPagedModel<TreeItemType>,
            TreeItemType[],
        >,
    >

    Requests the root items of the tree.

    UmbTreeRepository

    rootTreeItems?: () => Promise<Observable<TreeItemType[]>>

    Returns an observable of the root items of the tree.

    UmbTreeRepository

    Use requestTreeRootItems instead. It will be removed in Umbraco 18.

    treeItemsOf?: (
        parentUnique: string | null,
    ) => Promise<Observable<TreeItemType[]>>

    Returns an observable of the children of the given parent item.

    UmbTreeRepository

    Use requestTreeItemsOf instead. It will be removed in Umbraco 18.