function field_info_field_by_id in Drupal 7
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
23 calls to field_info_field_by_id()
- field_attach_delete in modules/
field/ field.attach.inc - Delete field data for an existing entity. This deletes all revisions of field data for the entity.
- field_attach_delete_revision in modules/
field/ field.attach.inc - Delete field data for a single revision of an existing entity. The passed entity must have a revision id attribute.
- field_attach_insert in modules/
field/ field.attach.inc - Save field data for a new entity.
- field_attach_load in modules/
field/ field.attach.inc - Loads fields for the current revisions of a group of entities.
- field_attach_update in modules/
field/ field.attach.inc - Save field data for an existing entity.
File
- modules/
field/ field.info.inc, line 541 - Field Info API, providing information about available fields and field types.
Code
function field_info_field_by_id($field_id) {
$cache = _field_info_field_cache();
return $cache
->getFieldById($field_id);
}