Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IDocumentRepository

    Represents a repository for IContent document entities.

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IDocumentRepository : IPublishableContentRepository<IContent>, IContentRepository<int, IContent>, IReadWriteQueryRepository<int, IContent>, IReadRepository<int, IContent>, IWriteRepository<IContent>, IQueryRepository<IContent>, IReadRepository<Guid, IContent>, IRepository

    Methods

    View Source

    AddOrUpdatePermissions(ContentPermissionSet)

    Used to add/update a permission for a content item

    Declaration
    void AddOrUpdatePermissions(ContentPermissionSet permission)
    Parameters
    Type Name Description
    ContentPermissionSet permission
    View Source

    AssignEntityPermission(IContent, string, IEnumerable<int>)

    Assigns a single permission to the current content item for the specified user group ids

    Declaration
    void AssignEntityPermission(IContent entity, string permission, IEnumerable<int> groupIds)
    Parameters
    Type Name Description
    IContent entity
    string permission
    IEnumerable<int> groupIds
    View Source

    GetPage(IQuery<IContent>?, long, int, out long, string[]?, IQuery<IContent>?, Ordering?, bool)

    Gets paged documents.

    Declaration
    IEnumerable<IContent> GetPage(IQuery<IContent>? query, long pageIndex, int pageSize, out long totalRecords, string[]? propertyAliases, IQuery<IContent>? filter, Ordering? ordering, bool loadTemplates)
    Parameters
    Type Name Description
    IQuery<IContent> query

    The base query for documents.

    long pageIndex

    The page index (zero-based).

    int pageSize

    The number of items per page.

    long totalRecords

    Output parameter with total record count.

    string[] propertyAliases

    Optional array of property aliases to load. If null, all properties are loaded. If empty array, no custom properties are loaded (only system properties).

    IQuery<IContent> filter

    Optional filter query.

    Ordering ordering

    The ordering specification.

    bool loadTemplates

    Whether to load templates. Set to false for performance optimization when templates are not needed (e.g., collection views). Default is true.

    Returns
    Type Description
    IEnumerable<IContent>

    A collection of documents for the specified page.

    Remarks

    Here, filter can be null but ordering cannot.

    View Source

    GetPermissionsForEntity(int)

    Gets the explicit list of permissions for the content item

    Declaration
    EntityPermissionCollection GetPermissionsForEntity(int entityId)
    Parameters
    Type Name Description
    int entityId
    Returns
    Type Description
    EntityPermissionCollection
    View Source

    RecycleBinSmells()

    Returns true if there is any content in the recycle bin

    Declaration
    bool RecycleBinSmells()
    Returns
    Type Description
    bool
    View Source

    ReplaceContentPermissions(EntityPermissionSet)

    Clears the publishing schedule for all entries having a date before (lower than, or equal to) a specified date.

    Declaration
    void ReplaceContentPermissions(EntityPermissionSet permissionSet)
    Parameters
    Type Name Description
    EntityPermissionSet permissionSet
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX