Symbiote\AdvancedWorkflow\Extensions\WorkflowEmbargoExpiryExtension
Adds embargo period and expiry dates to content items
- Author: marcus@symbiote.com.au
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class WorkflowEmbargoExpiryExtension
extends DataExtension
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $dependencies = ;
- private static array $defaults = ;
- public static bool $showTimePicker = true;
- protected WorkflowService $workflowService;
- public bool $isWorkflowInEffect = false;
- public static array $extendedMethodReturn = ;
- // methods
- public void updateCMSFields()
- public void clearPublishJob()
- public void clearUnPublishJob()
- protected void ensurePublishJob()
- protected void ensureUnPublishJob()
- public void onBeforeDuplicate()
- public void onBeforeWrite()
- public void updateStatusFlags()
- public void getIntroMessageParts()
- public void getIntroMessage()
- public void getCMSValidator()
- public array extendedRequiredFieldsEmbargoExpiry()
- public string getUserDate()
- public void setIsWorkflowInEffect()
- public void getIsWorkflowInEffect()
- public bool getIsPublishScheduled()
- public bool getIsUnPublishScheduled()
- public bool|null canEdit()
- public $this setWorkflowService()
- public WorkflowService getWorkflowService()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $db
- $defaults
- $dependencies
- $has_one
protected
- $workflowService — Symbiote\AdvancedWorkflow\Services\WorkflowService
public
- $extendedMethodReturn
—
array
A basic extended validation routine method return format - $isWorkflowInEffect
—
Symbiote\AdvancedWorkflow\Extensions\bool
Is a workflow in effect? - $showTimePicker — Symbiote\AdvancedWorkflow\Extensions\bool
Methods
protected
- ensurePublishJob() — Ensure the existence of a publish job at the specified time
- ensureUnPublishJob() — Ensure the existence of an unpublish job at the specified time
public
- canEdit() — Add edit check for when publishing has been scheduled and if any workflow definitions want the item to be disabled.
- clearPublishJob() — Clears any existing publish job against this dataobject
- clearUnPublishJob() — Clears any existing unpublish job
- extendedRequiredFieldsEmbargoExpiry() — This is called in the AWRequiredFields class, this validates whether an Embargo and Expiry are not equal and that Embargo is before Expiry, returning the appropriate message when it fails.
- getCMSValidator()
- getIntroMessage()
- getIntroMessageParts()
- getIsPublishScheduled() — Returns whether a publishing date has been set and is after the current date
- getIsUnPublishScheduled() — Returns whether an unpublishing date has been set and is after the current date
- getIsWorkflowInEffect()
- getUserDate() — Format a date according to member/user preferences
- getWorkflowService() — Get the workflow service instance
- onBeforeDuplicate()
- onBeforeWrite() — {@see PublishItemWorkflowAction} for approval of requested publish dates
- setIsWorkflowInEffect()
- setWorkflowService() — Set the workflow service instance
- updateCMSFields()
- updateStatusFlags() — Add badges to the site tree view to show that a page has been scheduled for publishing or unpublishing