You are here

function workflow_get_actions in Workflow 5

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_get_actions()

Get the actions associated with a given transition.

Parameters

int $tid:

Return value

array Actions as aid=>description pairs.

3 calls to workflow_get_actions()
workflow_actions_form in ./workflow.module
workflow_transition_delete in ./workflow.module
Delete a transition (and any associated actions).
workflow_workflow in ./workflow.module
Implementation of hook_workflow().

File

./workflow.module, line 1724

Code

function workflow_get_actions($tid) {
  $actions = array();
  if (!function_exists('actions_do')) {
    return $actions;
  }
  $result = db_query("SELECT a.aid, a.description FROM {actions} a INNER JOIN {workflow_actions} w ON a.aid = w.aid WHERE w.tid = %d", $tid);
  while ($data = db_fetch_object($result)) {
    $actions[$data->aid] = $data->description;
  }
  return $actions;
}