function workflow_field_extra_fields in Workflow 7
Same name and namespace in other branches
- 7.2 workflow.entity.inc \workflow_field_extra_fields()
Implements hook_field_extra_fields().
File
- ./
workflow.node.inc, line 222 - Node specific functions, remnants of nodeapi.
Code
function workflow_field_extra_fields() {
$extra = array();
// Get all workflows by content types.
$types = array_filter(workflow_get_workflow_type_map());
// Add the extra fields to each content type that has a workflow.
foreach ($types as $type => $wid) {
$extra['node'][$type] = array(
'form' => array(
'workflow' => array(
'label' => t('Workflow'),
'description' => t('Workflow module form'),
'weight' => 99,
),
),
'display' => array(
'workflow_current_state' => array(
'label' => t('Workflow: Current State'),
'description' => t('Current workflow state'),
'weight' => -99,
),
'workflow' => array(
'label' => t('Workflow: State Change Form'),
'description' => t('The form for controlling workflow state changes.'),
'weight' => 99,
),
),
);
}
return $extra;
}