\WorkflowPublicationRequest
A "publication request" is created when an author without publish rights changes a page in draft mode, and explicitly requests it to be reviewed for publication.
Each request can have one or more "Publishers" which
should have permissions to publish the specific page.
Synopsis
class WorkflowPublicationRequest
extends WorkflowRequest
{
- // Inherited members from WorkflowRequest
- public static array $db;
- public static array $has_one;
- public static array $has_many;
- public static array $many_many;
- public static boolean $allow_deny;
- public static $alerts;
- public static boolean $enable_all_alerts;
- protected array $memberIdsEmailed;
- protected static boolean $publisher_can_create_wf_requests;
- protected static boolean $force_publishers_to_use_workflow;
- // methods
- public static void create_for_page()
- public static void update_cms_actions()
- public void ViewEmbargoedLink()
- public void ViewExpiredLink()
- public void publish()
- public static boolean can_create()
- public void onAfterPublish()
- // Inherited methods from WorkflowRequest
- public static boolean|WorkflowPublicationRequest create_for_page()
- public static void should_send_alert()
- public static void set_alert()
- public static void load_default_alerts()
- public void set_publisher_can_create_wf_requests()
- public static void set_force_publishers_to_use_workflow()
- public boolean request()
- public void comment()
- public boolean requestedit()
- public boolean deny()
- public boolean cancel()
- public WorkflowRequestChange addNewChange()
- public void getCMSFields()
- public void ApprovalDate()
- public void getCMSDetailFields()
- public void EmbargoField()
- public void ExpiryField()
- public void getEmbargoDate()
- public void getExpiryDate()
- public void ExpiryDate()
- public void WorkflowTimezone()
- public void CanChangeEmbargoExpiry()
- public void notifyDenied()
- public void notifyCancelled()
- public void notifyAwaitingEdit()
- public void sendNotificationEmail()
- protected void ActionOnPage()
- public final void addMemberEmailed()
- public final DataObjectSet getMembersEmailed()
- public final void clearMembersEmailed()
- public void Diff()
- public void fromRecord()
- public void toRecord()
- public boolean isOpen()
- protected string getDiffLinkToLastPublished()
- public static boolean can_create()
- public static DataObjectSet get_by_author()
- public static DataObjectSet get()
- public string getTitle()
- public string getStatusDescription()
- public static void get_status_description()
- public void fieldLabels()
- public void provideI18nEntities()
- public void setSchedule()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
42 | Check for correct workflow class (a "publication" request might be overwritten with a "deletion" request) |
44 | reassign original author as a reviewer if present |
166 | Coupling to UI :-( |
645+ | Make the generation of this syntax use translatable. |
645+ | Get the generation out of here. The message that is displayed for any given operation should be generated by the operation, not centralised here. This logic assumes a certain syntax of the sentence, which assumes a modification to the page. |
Members
protected
- $force_publishers_to_use_workflow
- $memberIdsEmailed
-
$publisher_can_create_wf_requests
Set this to true if publishers and admins can request new workflows.
public
-
$alerts
Control who gets alerts for certain events data structure is fairly self-explanitory self::$alerts[CLASS][EVENT][USERROLE] = boolean Not all event/role combinations are neccessairily implemented by all ApprovalPaths. - $allow_deny
- $db
- $enable_all_alerts
- $has_many
- $has_one
- $many_many
Methods
public
- ViewEmbargoedLink()
- ViewExpiredLink()
- can_create()
- create_for_page()
- onAfterPublish()
- publish()
- update_cms_actions()
Inherited from WorkflowRequest
protected
- ActionOnPage() — Work out the phrase of what has happened to the page. This is sensitive to the type of request, the person making the change and the action they invoked. This allows us to send more descriptive emails. The cases specifically handled: - if an author has deleted a page => "deleted the page" - if a publisher or approver has denied deletion of a page => "undeleted the page" - otherwise => "made changes to"
- getDiffLinkToLastPublished() — Returns a CMS link to see differences made in the request
public
- ApprovalDate()
- CanChangeEmbargoExpiry() — Return true/false whether we can currently change the PublishAt time
- Diff() — Returns a {@link DataDifferencer} object representing the changes. Has some nasty logic to make it so that only changes that are made through fields that are exposed by the CMS are tracked.
- EmbargoField() — Return the field used for setting Embargo/Expiry date.
- ExpiryDate()
- ExpiryField()
- WorkflowTimezone()
- addMemberEmailed() — Add a member to the 'i've emailed them' list
- addNewChange() — Create a new {@link WorkflowRequestChange} with the current page status and versions, and link it to this object.
- can_create() — Determines if a request can be created by an author for a specific page.
- cancel() — Cancel this request, notify interested parties and close it. Used by {@link LeftAndMainCMSWorkflow} and {@link SiteTreeCMSWorkflow}.
- clearMembersEmailed() — Clear the list of people emailed this http request
- comment() — Comment on a workflow item without changing the status
- create_for_page() — Factory method setting up a new WorkflowRequest with associated state. Sets relations to publishers and authors,
- deny() — Deny this request, notify interested parties and close it. Used by {@link LeftAndMainCMSWorkflow} and {@link SiteTreeCMSWorkflow}.
- fieldLabels()
- fromRecord() — Returns the old record that will be replaced by this publication.
- get() — Get publication requests from all users
- getCMSDetailFields()
- getCMSFields()
- getEmbargoDate()
- getExpiryDate()
- getMembersEmailed() — Get a list of people emails this http request
- getStatusDescription()
- getTitle()
- get_status_description()
- isOpen() — Is the workflow request still pending.
- load_default_alerts()
- notifyAwaitingEdit()
- notifyCancelled()
- notifyDenied()
- provideI18nEntities()
- request() — Approve this request, notify interested parties and close it. Used by {@link LeftAndMainCMSWorkflow} and {@link SiteTreeCMSWorkflow}.
- requestedit() — Request an edit to this page before it can be published.
- sendNotificationEmail()
- setSchedule()
- set_alert()
- set_force_publishers_to_use_workflow() — Set this to true to force publishers to use the "Request publication" button, rather than "Save & Publish". Workflow admins won't be affected by this change.
- set_publisher_can_create_wf_requests()
- should_send_alert() — Should we send an email to the following group under these circumstances. Default to false.
- toRecord() — Returns the new record for which publication is being requested.