You are here

function workflow_get_workflow_type_map_by_wid in Workflow 7

Same name and namespace in other branches
  1. 7.2 workflow.node.type_map.inc \workflow_get_workflow_type_map_by_wid()

Given a wid, find all node types mapped to it.

1 call to workflow_get_workflow_type_map_by_wid()
workflow_get_workflows_full_object in ./workflow.features.inc
For use by CRUD only, gather everything into the CRUD formed object.

File

./workflow.node.type_map.inc, line 43
Node specific functions, remnants of nodeapi.

Code

function workflow_get_workflow_type_map_by_wid($wid) {
  static $map = array();
  if (!isset($map[$wid])) {
    $results = db_query('SELECT type, wid FROM {workflow_type_map} WHERE wid = :wid', array(
      ':wid' => $wid,
    ));
    $map[$wid] = $results
      ->fetchAll();
  }
  return $map[$wid];
}