function workflow_features_pipe_field_base_alter in Workflow 7.2
Implements hook_features_COMPONENT_alter().
Adds the corresponding Workflow to the WorkflowField.
File
- ./
workflow.features.inc, line 226 - Provides Features integration for Workflow using the CRUD API.
Code
function workflow_features_pipe_field_base_alter(&$pipe, $data, $export) {
if (!empty($data)) {
foreach ($data as $field_name) {
// $info = field_info_field($field_name);
$field = _workflow_info_field($field_name);
if ($field['type'] == 'workflow') {
// $field['settings']['wid'] can be numeric or named.
$workflow = workflow_load_single($field['settings']['wid']);
// Fields might reference missing workflows.
if (!empty($workflow)) {
$pipe['Workflow'][] = $workflow->name;
}
}
}
}
}