Class PageVersion
Handles loading and listing of page versions
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class PageVersion : ContentVersion, IReadOnly
Constructors
PageVersion(PageReference, String, VersionStatus, DateTime, String, String, Int32)
Initializes a new instance of the PageVersion class.
Declaration
public PageVersion(PageReference pageID, string name, VersionStatus workStatus, DateTime saved, string savedBy, string statusChangedBy, int masterVersionID)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageID | The page ID. |
System.String | name | The name of the version |
VersionStatus | workStatus | The status of the version |
System.DateTime | saved | The time the version was saved. |
System.String | savedBy | The person who saved the version |
System.String | statusChangedBy | The person who changed the page |
System.Int32 | masterVersionID | The master version ID for the page |
PageVersion(PageReference, String, VersionStatus, DateTime, String, String, Int32, String, Boolean)
Initializes a new instance of the PageVersion class.
Declaration
public PageVersion(PageReference pageID, string name, VersionStatus workStatus, DateTime saved, string savedBy, string statusChangedBy, int masterVersionID, string languageBranch, bool isMasterLanguageBranch)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageID | The page ID. |
System.String | name | The name of the version |
VersionStatus | workStatus | The status of the version |
System.DateTime | saved | The time the version was saved. |
System.String | savedBy | The person who saved the version |
System.String | statusChangedBy | The person who changed the page |
System.Int32 | masterVersionID | The master version ID for the page |
System.String | languageBranch | The language branch for the version |
System.Boolean | isMasterLanguageBranch | if set to |
PageVersion(PageReference, String, VersionStatus, DateTime, String, String, Int32, String, Boolean, Boolean)
Initializes a new instance of the PageVersion class.
Declaration
public PageVersion(PageReference pageID, string name, VersionStatus workStatus, DateTime saved, string savedBy, string statusChangedBy, int masterVersionID, string languageBranch, bool isMasterLanguageBranch, bool commonDraft)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageID | The page ID. |
System.String | name | The name. |
VersionStatus | workStatus | The work status. |
System.DateTime | saved | The saved. |
System.String | savedBy | The saved by. |
System.String | statusChangedBy | The status changed by. |
System.Int32 | masterVersionID | The master version ID. |
System.String | languageBranch | The language branch. |
System.Boolean | isMasterLanguageBranch | if set to |
System.Boolean | commonDraft | if set to |
Properties
ID
Gets or sets the ID for the page version
Declaration
[Obsolete("Use ContentLink instead.", false)]
public PageReference ID { get; set; }
Property Value
Type | Description |
---|---|
PageReference | The ID. |
Methods
List(PageReference)
Lists all versions for a specific page
Declaration
[Obsolete("Use IContentVersionRepository instead")]
public static PageVersionCollection List(PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link. |
Returns
Type | Description |
---|---|
PageVersionCollection | all versions for a page |
List(PageReference, String)
Lists all versions for a page for a specific language
Declaration
[Obsolete("Use IContentVersionRepository instead")]
public static PageVersionCollection List(PageReference pageLink, string languageBranch)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link. |
System.String | languageBranch | The language branch. |
Returns
Type | Description |
---|---|
PageVersionCollection | all matching versions |
ListDelayedPublish()
Lists all pages that are set to delayed publish.
Declaration
[Obsolete("Use IContentVersionRepository.ListDelayedPublish instead")]
public static PageDataCollection ListDelayedPublish()
Returns
Type | Description |
---|---|
PageDataCollection | matching pages |
ListPublishedVersions(PageReference)
Lists all published versions for a page
Declaration
[Obsolete("Use IContentVersionRepository instead")]
public static PageVersionCollection ListPublishedVersions(PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link. |
Returns
Type | Description |
---|---|
PageVersionCollection | published versions |
Load(PageReference)
Loads the version for a specific page reference
Declaration
[Obsolete("Use IContentVersionRepository instead")]
public static PageVersion Load(PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link. |
Returns
Type | Description |
---|---|
PageVersion | the page version |
LoadPublishedVersion(PageReference)
Loads the published version for the master language
Declaration
[Obsolete("Use IContentVersionRepository instead")]
public static PageVersion LoadPublishedVersion(PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link. |
Returns
Type | Description |
---|---|
PageVersion | published version in master language |
LoadPublishedVersion(PageReference, String)
Loads the published version for a language
Declaration
[Obsolete("Use IContentVersionRepository instead")]
public static PageVersion LoadPublishedVersion(PageReference pageLink, string languageBranch)
Parameters
Type | Name | Description |
---|---|---|
PageReference | pageLink | The page link. |
System.String | languageBranch | The language branch. |
Returns
Type | Description |
---|---|
PageVersion | the published version |