| 7 field.info.inc | field_info_field_by_id($field_id) |
| 8 field.info.inc | field_info_field_by_id($field_id) |
Returns data about an individual field, given a field ID.
Parameters
$field_id: The id of the field to retrieve. $field_id can refer to a deleted field, but not an inactive one.
Return value
The field array, as returned by field_read_fields(), with an additional element 'bundles', whose value is an array of all the bundles this field belongs to.
See also
Related topics
19 calls to field_info_field_by_id()
File
- modules/
field/ field.info.inc, line 641 - Field Info API, providing information about available fields and field types.
Code
function field_info_field_by_id($field_id) {
$info = _field_info_collate_fields();
if (isset($info['fields'][$field_id])) {
return $info['fields'][$field_id];
}
}
Login or register to post comments