ContentService.GetVersions Method
- Namespace:
- Weavy.Core.Services
- Assembly:
- Weavy.Core.dll
Overloads
Get |
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. |
Get |
Gets the version history for a Content item. |
GetVersions(int, bool, 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 sudo = false, bool trashed = false)
Parameters
- id
- int
Id of the Content item for which to get versions.
- sudo
- bool
true
to perform action as super user, otherwise false
.
- trashed
- bool
true
to return trashed items, otherwise false
.
Returns
System.Collections.Generic.IEnumerable
Returns a list of Content objects.
GetVersions(T, bool, bool)
Gets the version history for a Content item.
public static IEnumerable<T> GetVersions<T>(T content, bool sudo = false, bool trashed = false)
where T : Content, IVersionable
Parameters
- content
Content item for which to get versions.
- sudo
- bool
true
to perform action as super user, otherwise false
.
- trashed
- bool
true
to return trashed items, otherwise false
.
Returns
System.Collections.Generic.IEnumerable<>
Returns a list of Content objects of type T
.