You are here

function workflow_update_workflow_node in Workflow 7.2

Same name and namespace in other branches
  1. 7 workflow.module \workflow_update_workflow_node()

Given data, insert the node association.

1 call to workflow_update_workflow_node()
WorkflowTransition::execute in includes/Entity/WorkflowTransition.php
Execute a transition (change state of a node).

File

./workflow.module, line 945
Support workflows made up of arbitrary states.

Code

function workflow_update_workflow_node($data) {
  $data = (object) $data;
  if (isset($data->nid) && workflow_get_workflow_node_by_nid($data->nid)) {
    drupal_write_record('workflow_node', $data, 'nid');
  }
  else {
    drupal_write_record('workflow_node', $data);
  }
}