function workflow_get_workflow_states_by_sid in Workflow 7
Same name and namespace in other branches
- 7.2 workflow.deprecated.inc \workflow_get_workflow_states_by_sid()
Given a sid, return a state. Sids are a unique id.
@deprecated: workflow_get_workflow_states_by_sid($sid) --> WorkflowState::load($sid)
1 call to workflow_get_workflow_states_by_sid()
- workflow_get_workflows_full_object in ./
workflow.features.inc - For use by CRUD only, gather everything into the CRUD formed object.
File
- ./
workflow.deprecated.inc, line 168 - Contains contains per-class functions, that are deprecated. Usage: The new code can be tested, by removing this file-include from workflow.module.
Code
function workflow_get_workflow_states_by_sid($sid, $options = array()) {
static $sids = array();
if (!isset($sids[$sid])) {
$states = workflow_get_workflow_states(array(
'sid' => $sid,
));
$sids[$sid] = reset($states);
}
return $sids[$sid];
}