\SiteTreeCMSWorkflow
Extension to SiteTree for CMS Workflow support.
Synopsis
class SiteTreeCMSWorkflow
extends DataObjectDecorator
{
- // members
- protected static Array $allowed_request_classes = ;
- // methods
- public static bool register_request()
- public static bool unregister_request()
- public void extraStatics()
- public boolean setEmbargo()
- public boolean setExpiry()
- public boolean resetEmbargo()
- public boolean resetExpiry()
- public void canChangeEmbargo()
- public void canChangeExpiry()
- public void cancelexpiry()
- public void updateCMSFields()
- public void ViewExpiredLink()
- public void BacklinkTable()
- public FieldSet getWorkflowCMSFields()
- public void updateCMSActions()
- public void WorkflowActions()
- public DataObjectSet ClosedWorkflowRequests()
- public void openWorkflowRequest()
- public void openOrNewWorkflowRequest()
- public void LastEditedBy()
- public void onAfterPublish()
- public void onBeforeDelete()
- public void onAfterRevertToLive()
- public void onBeforeDuplicate()
- public void providePermissions()
Hierarchy
Extends
- DataObjectDecorator
Tasks
Line | Task |
---|---|
11+ | Currently a publication/deletion approval is implicit by the "save and publish" and "delete from live" actions. This also means that CMS editors not assigned to this workflow, but with publish rights on the page can (unknowingly) end a workflow request. These assumptions are codified in {@link onAfterPublish()} and {@link onAfterDelete()} |
348+ | This is a pretty clear example of user-interface logic baked into the model. We should solve this at a Sapphire-framework level, somehow. |
Members
protected
- $allowed_request_classes
—
Array
A registry of all allowed request classes.
Methods
public
- BacklinkTable()
- ClosedWorkflowRequests() — Return a DataObjectSet of Closed workflow requests.
- LastEditedBy()
- ViewExpiredLink()
- WorkflowActions() — Returns actions for the worfklow tab.
- canChangeEmbargo() — Can we change the embargo date - only if there is an open workflow request
- canChangeExpiry() — Can we change the embargo date - only if there is an open workflow request
- cancelexpiry() — Cancel a expiry on the live end directly
- extraStatics()
- getWorkflowCMSFields()
- onAfterPublish() — After publishing remove from the report of items needing publication
- onAfterRevertToLive()
- onBeforeDelete()
- onBeforeDuplicate()
- openOrNewWorkflowRequest()
- openWorkflowRequest()
- providePermissions()
- register_request()
- resetEmbargo() — Reset the embargo date
- resetExpiry() — Reset the expiry date
- setEmbargo() — Set the embargo date for this SiteTree object this actually gets written to the current open workflow request, not the SiteTree object.
- setExpiry() — Set the expiry date for this SiteTree object
- unregister_request()
- updateCMSActions() — Normal authors (without publication permission) can perform certain actions on a page, e.g. "save" and "delete from draft". Other permissions like "publish" or "delete from live" are hidden based on the {@link SiteTree->canPublish()} permission, and replaced with triggers for requesting these actions ("request publication" and "request deletion").
- updateCMSFields()