ContentService.GetVersions Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Overloads

GetVersions(int, bool) Gets the version history for a Content item. The first item in the list is the current version. The last item is the oldest version.
GetVersions(T, bool) Gets the version history for a Content item.

GetVersions(int, bool)

Gets the version history for a Content item. The first item in the list is the current version. The last item is the oldest version.

public static IEnumerable<IVersionable> GetVersions(int id, bool filter = true)

Parameters

id
int

Id of the Content item for which to get versions.

filter
bool

true to filter out items that are trashed or where the user does not have View permission, otherwise false.

Returns

System.Collections.Generic.IEnumerable

Returns a list of Content objects.

GetVersions(T, bool)

Gets the version history for a Content item.

public static IEnumerable<T> GetVersions<T>(T content, bool filter = true)

    where T : Content, IVersionable

Parameters

content

Content item for which to get versions.

filter
bool

true to filter out items that are trashed or where the user does not have View permission, otherwise false.

Returns

System.Collections.Generic.IEnumerable<>

Returns a list of T objects.