View Source
Interface IContentVersionRepository
Assembly: Umbraco.Core.dll
Syntax
public interface IContentVersionRepository : IRepository
Methods
View Source
DeleteVersions(IEnumerable<int>)
Deletes multiple content versions by ID.
Declaration
void DeleteVersions(IEnumerable<int> versionIds)
Parameters
| Type |
Name |
Description |
| IEnumerable<int> |
versionIds |
|
View Source
Get(int)
Gets the content version metadata for a specific version.
Declaration
ContentVersionMeta? Get(int versionId)
Parameters
| Type |
Name |
Description |
| int |
versionId |
|
Returns
View Source
GetCleanupPolicies()
Gets cleanup policy override settings per content type.
Declaration
IReadOnlyCollection<ContentVersionCleanupPolicySettings> GetCleanupPolicies()
Returns
View Source
GetContentVersionsEligibleForCleanup(DateTime, int?)
Gets content versions eligible for cleanup, filtered to those older than the
specified date and limited to a maximum number of results, ordered oldest first.
Declaration
IReadOnlyCollection<ContentVersionMeta> GetContentVersionsEligibleForCleanup(DateTime olderThan, int? maxCount)
Parameters
| Type |
Name |
Description |
| DateTime |
olderThan |
Only versions with a date earlier than this are returned.
|
| int? |
maxCount |
The maximum number of versions to return, or null for no limit.
|
Returns
View Source
GetPagedItemsByContentId(int, long, int, out long, int?)
Gets paginated content versions for given content id paginated.
Declaration
IEnumerable<ContentVersionMeta> GetPagedItemsByContentId(int contentId, long pageIndex, int pageSize, out long totalRecords, int? languageId = null)
Parameters
| Type |
Name |
Description |
| int |
contentId |
|
| long |
pageIndex |
|
| int |
pageSize |
|
| long |
totalRecords |
|
| int? |
languageId |
|
Returns
View Source
SetPreventCleanup(int, bool)
Updates the prevent cleanup flag on a content version.
Declaration
void SetPreventCleanup(int versionId, bool preventCleanup)
Parameters
| Type |
Name |
Description |
| int |
versionId |
|
| bool |
preventCleanup |
|