Search Results for

    Show / Hide Table of Contents
    View Source

    Class TrackedReferencesController

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    BackOfficeNotificationsController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [Authorize(Policy = "SectionAccessContentOrMedia")]
    public class TrackedReferencesController : BackOfficeNotificationsController

    Constructors

    View Source

    TrackedReferencesController(ITrackedReferencesService)

    Declaration
    public TrackedReferencesController(ITrackedReferencesService relationService)
    Parameters
    Type Name Description
    ITrackedReferencesService relationService

    Methods

    View Source

    GetPagedDescendantsInReferences(Int32, Int32, Int32, Boolean)

    Gets a page list of the child nodes of the current item used in any kind of relation.

    Declaration
    public ActionResult<PagedResult<RelationItem>> GetPagedDescendantsInReferences(int parentId, int pageNumber = 1, int pageSize = 100, bool filterMustBeIsDependency = true)
    Parameters
    Type Name Description
    System.Int32 parentId
    System.Int32 pageNumber
    System.Int32 pageSize
    System.Boolean filterMustBeIsDependency
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<PagedResult<RelationItem>>
    Remarks

    Used when deleting and unpublishing a single item to check if this item has any descending items that are in any kind of relation. This is basically finding the descending items which are children in relations.

    View Source

    GetPagedReferencedItems(Int32[], Int32, Int32, Boolean)

    Gets a page list of the items used in any kind of relation from selected integer ids.

    Declaration
    [HttpGet]
    [HttpPost]
    public ActionResult<PagedResult<RelationItem>> GetPagedReferencedItems([FromJsonPath] int[] ids, int pageNumber = 1, int pageSize = 100, bool filterMustBeIsDependency = true)
    Parameters
    Type Name Description
    System.Int32[] ids
    System.Int32 pageNumber
    System.Int32 pageSize
    System.Boolean filterMustBeIsDependency
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<PagedResult<RelationItem>>
    Remarks

    Used when bulk deleting content/media and bulk unpublishing content (delete and unpublish on List view). This is basically finding children of relations.

    View Source

    GetPagedReferences(Int32, Int32, Int32, Boolean)

    Gets a page list of tracked references for the current item, so you can see where an item is being used.

    Declaration
    public ActionResult<PagedResult<RelationItem>> GetPagedReferences(int id, int pageNumber = 1, int pageSize = 100, bool filterMustBeIsDependency = false)
    Parameters
    Type Name Description
    System.Int32 id
    System.Int32 pageNumber
    System.Int32 pageSize
    System.Boolean filterMustBeIsDependency
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<PagedResult<RelationItem>>
    Remarks

    Used by info tabs on content, media etc. and for the delete and unpublish of single items. This is basically finding parents of relations.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TrackedReferencesController(ITrackedReferencesService)
    • Methods
      • GetPagedDescendantsInReferences(Int32, Int32, Int32, Boolean)
      • GetPagedReferencedItems(Int32[], Int32, Int32, Boolean)
      • GetPagedReferences(Int32, Int32, Int32, Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX