function workflow_features_export_render in Workflow 7
Implements hook_features_export_render().
File
- ./
workflow.features.inc, line 37 - Integrates workflow with features.
Code
function workflow_features_export_render($module, $data) {
$translatables = $code = array();
$code[] = ' $workflows = array();';
$code[] = '';
$workflows = Workflow::getWorkflows();
foreach ($data as $name) {
if ($workflow = workflow_get_workflows_full_object($name)) {
unset($workflow->wid);
$workflow_export = features_var_export($workflow, ' ');
$workflow_identifier = features_var_export($workflow->name);
$code[] = " // Exported workflow: {$name}";
$code[] = " \$workflows[{$workflow_identifier}] = {$workflow_export};";
$code[] = "";
}
}
$code[] = ' return $workflows;';
$code = implode("\n", $code);
return array(
'workflow_default_workflows' => $code,
);
}