function field_info_field_by_ids in Drupal 7
Returns the same data as field_info_field_by_id() for every field.
Use of this function should be avoided when possible, since it loads and statically caches a potentially large array of information.
When iterating over the fields present in a given bundle after a call to field_info_instances($entity_type, $bundle), it is recommended to use field_info_field() on each individual field instead.
Return value
An array, each key is a field ID and the values are field arrays as returned by field_read_fields(), with an additional element 'bundles', whose value is an array of all the bundle this field belongs to.
See also
Related topics
File
- modules/
field/ field.info.inc, line 564 - Field Info API, providing information about available fields and field types.
Code
function field_info_field_by_ids() {
$cache = _field_info_field_cache();
return $cache
->getFields();
}