function state_flow_entity_property_info_alter in State Machine 7
Same name and namespace in other branches
- 7.3 modules/state_flow/state_flow.module \state_flow_entity_property_info_alter()
- 7.2 modules/state_flow/state_flow.module \state_flow_entity_property_info_alter()
Implements hook_entity_property_info_alter().
Adds a "state" property on nodes that are configured with state flow.
File
- modules/
state_flow/ state_flow.module, line 101 - An implementation of node revision workflow for Drupal based on the State Machine system.
Code
function state_flow_entity_property_info_alter(&$info) {
foreach ($info['node']['bundles'] as $entity_type => $entity_info) {
if (variable_get('state_flow_' . $entity_type, '')) {
$info['node']['bundles'][$entity_type]['properties']['state'] = array(
'label' => t('Workflow state'),
'description' => t('The current workflow state for this node revision.'),
'getter callback' => 'state_flow_entity_get_state',
);
}
}
}