function workflow_create in Workflow 5
Same name and namespace in other branches
- 5.2 workflow.module \workflow_create()
- 6.2 workflow.module \workflow_create()
- 6 workflow.module \workflow_create()
- 7.2 workflow.entity.inc \workflow_create()
Create a workflow and its (creation) state.
Parameters
$name: The name of the workflow.
1 call to workflow_create()
File
- ./
workflow.module, line 1506
Code
function workflow_create($name) {
$wid = db_next_id('{workflows}_wid');
db_query("INSERT INTO {workflows} (wid, name) VALUES (%d, '%s')", $wid, $name);
workflow_state_save(array(
'wid' => $wid,
'state' => t('(creation)'),
'sysid' => WORKFLOW_CREATION,
'weight' => WORKFLOW_CREATION_DEFAULT_WEIGHT,
));
return $wid;
}