You are here

function workflow_types_save in Workflow 5

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_types_save()
  2. 6.2 workflow.module \workflow_types_save()
  3. 6 workflow.module \workflow_types_save()

Save mapping of workflow to node type. E.g., "the story node type is using the Foo workflow."

Parameters

$form_values:

1 call to workflow_types_save()
workflow_types_form_submit in ./workflow.module

File

./workflow.module, line 1706

Code

function workflow_types_save($form_values) {
  $nodetypes = node_get_types();
  db_query("DELETE FROM {workflow_type_map}");
  foreach ($nodetypes as $type => $name) {
    db_query("INSERT INTO {workflow_type_map} (type, wid) VALUES ('%s', %d)", $type, intval($form_values[$type]));
  }
}