public function export(HTTPRequest $request)
    {
        $url = explode('/', $request->getURL());
        $definitionID = end($url);
        if ($definitionID && is_numeric($definitionID)) {
            $exporter = new WorkflowDefinitionExporter($definitionID);
            $exportFilename = WorkflowDefinitionExporter::config()
                ->get('export_filename_prefix') . '-' . $definitionID . '.yml';
            $exportBody = $exporter->export();
            $fileData = array(
                'name' => $exportFilename,
                'mime' => 'text/x-yaml',
                'body' => $exportBody,
                'size' => $exporter->getExportSize($exportBody)
            );
            return $exporter->sendFile($fileData);
        }
    }
public function export(HTTPRequest $request)
    {
        $url = explode('/', $request->getURL());
        $definitionID = end($url);
        if ($definitionID && is_numeric($definitionID)) {
            $exporter = new WorkflowDefinitionExporter($definitionID);
            $exportFilename = WorkflowDefinitionExporter::config()
                ->get('export_filename_prefix') . '-' . $definitionID . '.yml';
            $exportBody = $exporter->export();
            $fileData = array(
                'name' => $exportFilename,
                'mime' => 'text/x-yaml',
                'body' => $exportBody,
                'size' => $exporter->getExportSize($exportBody)
            );
            return $exporter->sendFile($fileData);
        }
    }
public function export ( HTTPRequest $ request ) { $ url = explode ( '/' , $ request -> getURL ( ) ) ; $ definitionID = end ( $ url ) ; if ( $ definitionID && is_numeric ( $ definitionID ) ) { $ exporter = new WorkflowDefinitionExporter ( $ definitionID ) ; $ exportFilename = WorkflowDefinitionExporter :: config ( ) -> get ( 'export_filename_prefix' ) . '-' . $ definitionID . '.yml' ; $ exportBody = $ exporter -> export ( ) ; $ fileData = array ( 'name' => $ exportFilename , 'mime' => 'text/x-yaml' , 'body' => $ exportBody , 'size' => $ exporter -> getExportSize ( $ exportBody ) ) ; return $ exporter -> sendFile ( $ fileData ) ; } }
Spits out an exported version of the selected WorkflowDefinition for download.

@param HTTPRequest $request
@return HTTPResponse
Spits out an exported version of the selected WorkflowDefinition for download .