function features_field_load in Features 7.2
Same name and namespace in other branches
- 7 includes/features.field.inc \features_field_load()
Loads a combined array with field base and field instance definition.
Parameters
string $identifier: Format: "$entity_type-$bundle-$field_name".
Return value
array|false Array with information about the field base and the field instance.
1 call to features_field_load()
- field_features_export_render in includes/
features.field.inc - Implements hook_features_export_render().
File
- includes/
features.field.inc, line 595 - Features integration on behalf of 'field' module.
Code
function features_field_load($identifier) {
list($entity_type, $bundle, $field_name) = explode('-', $identifier);
$field_info = field_info_field($field_name);
$instance_info = field_info_instance($entity_type, $field_name, $bundle);
if ($field_info && $instance_info) {
unset($field_info['id']);
unset($field_info['bundles']);
unset($instance_info['id']);
unset($instance_info['field_id']);
return array(
'field_config' => $field_info,
'field_instance' => $instance_info,
);
}
return FALSE;
}