You are here

function workflow_get_workflow_type_map_by_wid in Workflow 7.2

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

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

1 call to workflow_get_workflow_type_map_by_wid()
Workflow::getTypeMap in includes/Entity/Workflow.php
Gets a the type map for a given workflow.

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];
}