silverstripe-terraformers / silverstripe-embargo-expiry

BSD 3-Clause "New" or "Revised" License
7 stars 7 forks source link

Improve extensibility for external modules #100

Closed chrispenny closed 2 years ago

chrispenny commented 2 years ago

Allow external modules to halt Embargo & Expiry from queueing Jobs.

Primarily focused at the Advanced Workflow module, but this could work for anything that wants to prevent the queueing of Jobs through the onAfterWrite() in preference for [some other method].

For example, Advanced Workflow implements the preventEmbargoExpiryQueueJobs() extension point in its own extension, and it allows or denies based on the current workflow status. It later then manually instantiates the ensurePublishJob() and/or ensureUnPublishJob() at a time when it wants the Jobs to be queued.