function field_info_field_by_ids

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

field_info_field()

field_info_field_by_id()

Related topics

File

modules/field/field.info.inc, line 564

Code

function field_info_field_by_ids() {
    $cache = _field_info_field_cache();
    return $cache->getFields();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.