function workflow_views_entity_info_alter in Workflow 7.2
Implements hook_entity_info_alter().
Create a new 'workflow_tab' view mode, to use in the workflow history tab.
File
- workflow_views/
workflow_views.module, line 28 - Provide views integration for workflows.
Code
function workflow_views_entity_info_alter(&$entity_info) {
$field_maps = _workflow_info_fields();
foreach ($field_maps as $field_name => $field_map) {
foreach ($field_map['bundles'] as $entity_type => $bundles) {
if (isset($entity_info[$entity_type])) {
// If a module is rudely disabled, the $entity may not exist anymore.
$entity_info[$entity_type]['view modes']['workflow_tab'] = array(
'label' => t('Workflow History'),
'custom settings' => FALSE,
);
}
}
}
}