ContentService.GetDraft Method
- Namespace:
- Weavy.Core.Services
- Assembly:
- Weavy.Core.dll
Overloads
Get |
Gets the current draft of the specified Content item. |
Get |
Gets the current draft of the specified Content item. |
GetDraft(int, bool, bool)
Gets the current draft of the specified Content item.
public static Content GetDraft(int id, bool sudo = false, bool trashed = false)
Parameters
- id
- int
Id of the Content item for which to get draft.
- sudo
- bool
true
to perform action as super user, otherwise false
.
- trashed
- bool
true
to return content even if trashed, otherwise false
.
Returns
GetDraft(int, bool, bool)
Gets the current draft of the specified Content item.
public static T GetDraft<T>(int id, bool sudo = false, bool trashed = false)
where T : Content, IDraftable
Parameters
- id
- int
Id of the Content item for which to get draft.
- sudo
- bool
true
to perform action as super user, otherwise false
.
- trashed
- bool
true
to return content even if trashed, otherwise false
.
Returns
Returns a Content object of type T
.