\WorkflowDefinitionExporter
Allows workflow definitions to be exported from one SilverStripe install, ready for import into another.
YAML is used for export as it's native to SilverStripe's config system and we're using for some of the import-specific heavy lifting, which is already heavily predicated on YAML.
- Author: russell@silverstripe.com
- License: BSD License (http://silverstripe.org/bsd-license/)
Synopsis
class WorkflowDefinitionExporter
{
- // members
- public static string $export_filename_prefix = 'workflow-definition-export';
- protected Member $member;
- protected WorkflowDefinition $workflowDefinition;
- // methods
- public void __construct()
- public void setMember()
- public WorkflowDefinition getDefinition()
- public string export()
- public void format()
- public number getExportSize()
- public ArrayData ExportMetaData()
- private void ssVersion()
- private void processTitle()
- public SS_HTTPResponse sendFile()
Tasks
Line | Task |
---|---|
20+ | - If workflow-def is created badly, the "update template definition" logic, sometimes doesn't work |
Members
protected
- $member — \Member
- $workflowDefinition — \WorkflowDefinition
public
- $export_filename_prefix
—
string
The base filename of the file to the exported
Methods
private
public
- __construct()
- ExportMetaData() — Generate template vars for metadata
- export() — Runs the export
- format() — Format the exported data as YAML.
- getDefinition()
- getExportSize() — Returns the size of the current export in bytes.
- sendFile() — Prompt the client for file download.
- setMember()