\WorkflowDefinition
Synopsis
class WorkflowDefinition
extends DataObject
{
- // members
- private static array $db = ;
- private static string $default_sort = 'Sort';
- private static array $has_many = ;
- private static array $many_many = ;
- public static string $icon = 'advancedworkflow/images/definition.png';
- public static string $default_workflow_title_base = 'My Workflow';
- public static array $workflow_defs = ;
- private static array $dependencies = ;
- public WorkflowService $workflowService;
- // methods
- public WorkflowAction getInitialAction()
- public void onBeforeWrite()
- public void onAfterWrite()
- public null onBeforeDelete()
- private void removeRelatedHasLists()
- private void deleteRelatedImport()
- public int numChildren()
- public void fieldLabels()
- public void getCMSFields()
- public void updateAdminActions()
- public void updateFromTemplate()
- public string getDefaultWorkflowTitle()
- public string incomingTitle()
- public boolean canCreate()
- public boolean canView()
- public boolean canEdit()
- public boolean canDelete()
- protected void userHasAccess()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Tasks
Line | Task |
---|---|
344+ | Filter query on current-user's workflows. Avoids confusion when other users may already have 'My Workflow 1' and user sees 'My Workflow 2' |
Members
private
- $db
- $default_sort
- $dependencies
- $has_many
- $many_many
—
array
By default, a workflow definition is bound to a particular set of users or groups.
public
- $default_workflow_title_base
- $icon
- $workflowService — WorkflowService
- $workflow_defs
Methods
private
- deleteRelatedImport() — Deletes related ImportedWorkflowTemplate objects.
- removeRelatedHasLists() — Removes User+Group relations from this object as well as WorkflowAction relations.
protected
- userHasAccess() — Checks whether the passed user is able to view this ModelAdmin
public
- canCreate()
- canDelete()
- canEdit()
- canView()
- fieldLabels()
- getCMSFields()
- getDefaultWorkflowTitle() — If a workflow-title doesn't already exist, we automatically create a suitable default title when users attempt to create title-less workflow definitions or upload/create Workflows that would otherwise have the same name.
- getInitialAction() — Gets the action that first triggers off the workflow
- incomingTitle() — Return the workflow definition title according to the source
- numChildren()
- onAfterWrite() — After we've been written, check whether we've got a template and to then create the relevant actions etc.
- onBeforeDelete() — Ensure all WorkflowDefinition relations are removed on delete. If we don't do this, we see issues with targets previously under the control of a now-deleted workflow, becoming stuck, even if a new workflow is subsequently assigned to it.
- onBeforeWrite() — Ensure a sort value is set and we get a useable initial workflow title.
- updateAdminActions()
- updateFromTemplate()