Symbiote\AdvancedWorkflow\Admin\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
- private 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 string ssVersion()
- private void processTitle()
- public HTTPResponse sendFile()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Tasks
Line | Task |
---|---|
32+ | - If workflow-def is created badly, the "update template definition" logic, sometimes doesn't work |
Members
private
- $export_filename_prefix
—
string
The base filename of the file to the exported
protected
- $member — SilverStripe\Security\Member
- $workflowDefinition — Symbiote\AdvancedWorkflow\DataObjects\WorkflowDefinition
Methods
private
- processTitle()
- ssVersion() — Try different ways of obtaining the current SilverStripe version for YAML output.
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()