\Publishable
Publishable provides methods for publishing, saving drafts, deleting, etc for DataObjects extended with Versioned.
- Author: Tom Densham <tom.densham@studiobonito.co.uk>
- Copyright: (c) 2012, Studio Bonito Ltd.
Synopsis
class Publishable
extends DataExtension
{
- // methods
- public boolean getIsDeletedFromStage()
- public void getExistsOnLive()
- public boolean getIsModifiedOnStage()
- public boolean getIsAddedToStage()
- public void isNew()
- public void isPublished()
- public void canPublish()
- public void canDeleteFromLive()
- public void doPublish()
- public void doUnpublish()
- public void doSaveDraft()
- public void doDeleteDraft()
- public void doRestore()
- public void doRevert()
Hierarchy
Extends
- DataExtension
Methods
public
- canDeleteFromLive()
- canPublish()
- doDeleteDraft() — Delete the current draft of the DataObject by deleting the record from the Stage table.
- doPublish() — Publishes the DataObject by writting a record to the Stage and the Live tables.
- doRestore() — Restore the current draft DataObject by writting the current DataObject to the Stage table.
- doRevert() — Revert the current draft DataObject by writting the current record from the Live table to the Stage table.
- doSaveDraft() — Save a draft of the DataObject by writting the record to the Stage table and creating a new record in the Versions table if the DataObject has changed.
- doUnpublish() — Unpublish the DataObject by deleting the record from the Live table.
- getExistsOnLive() — Return true if this page exists on the live site
- getIsAddedToStage() — Compares current draft with live version, and returns true if no live version exists, meaning the page was never published.
- getIsDeletedFromStage() — Compares current draft with live version, and returns TRUE if no draft version of this page exists, but the page is still published (after triggering "Delete from draft site" in the CMS).
- getIsModifiedOnStage() — Compares current draft with live version, and returns TRUE if these versions differ, meaning there have been unpublished changes to the draft site.
- isNew()
- isPublished()