function field_info_field_by_id
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
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); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.info.inc/function/field_info_field_by_id/7.x