function workflow_insert_workflow_type_map in Workflow 7
Same name and namespace in other branches
- 7.2 workflow.node.type_map.inc \workflow_insert_workflow_type_map()
Given information, insert a new workflow_type_map. Returns data by ref. (like node_save). @TODO: why is this here instead of the admin_ui?
2 calls to workflow_insert_workflow_type_map()
- workflow_admin_ui_types_save in workflow_admin_ui/
workflow_admin_ui.module - Save mapping of workflow to node type. E.g., the story node type is using the Foo workflow.
- workflow_update_workflows_full_object in ./
workflow.features.inc - For use by CRUD only, save everything from the CRUD formed object.
File
- ./
workflow.node.type_map.inc, line 79 - Node specific functions, remnants of nodeapi.
Code
function workflow_insert_workflow_type_map(&$data) {
$data = (object) $data;
// Be sure we have a clean insert. There should never be more than one map for a type.
if (isset($data->type)) {
workflow_delete_workflow_type_map_by_type($data->type);
}
drupal_write_record('workflow_type_map', $data);
}