function cmf_get_workflows in Content Management Filter 7
Same name and namespace in other branches
- 6.2 cmf.module \cmf_get_workflows()
1 call to cmf_get_workflows()
- cmf_filters in ./
cmf.module - List node administration filters that can be applied.
File
- ./
cmf.module, line 1077 - @brief Content management filter module file
Code
function cmf_get_workflows() {
if (!module_exists('workflow')) {
return;
}
if (!function_exists('workflow_load_all')) {
return;
}
$workflows = workflow_load_all();
$states = array();
if (is_array($workflows)) {
foreach ($workflows as $workflow) {
if (is_array($workflow->states)) {
foreach ($workflow->states as $state) {
$states[$state->name] = $workflow->label . " : " . $state->label;
}
}
}
}
return $states;
}