function state_flow_get_all_states in State Machine 7.2
Same name and namespace in other branches
- 7.3 modules/state_flow/state_flow.module \state_flow_get_all_states()
Get all of the states for all content types
1 call to state_flow_get_all_states()
- state_flow_node_revision_filters in modules/
state_flow/ state_flow.module - Implements hook_node_revision_filters()
File
- modules/
state_flow/ state_flow.module, line 357 - An implementation of node revision workflow for Drupal based on the State Machine system.
Code
function state_flow_get_all_states() {
static $states = array();
if (empty($states)) {
$i = 0;
foreach (node_type_get_types() as $type_key => $type) {
// Fake a node object
$node = new stdClass();
$node->vid = $i;
$i++;
$node->type = $type_key;
$state_machine = state_flow_load_state_machine($node);
if (!$state_machine
->ignore()) {
$states += $state_machine
->get_states_options();
}
}
}
return $states;
}