1 field.info.inc _field_read_fields_cache()

Helper function used by _field_info_collate_fields().

This function keeps a static variable of all raw field configurations, without any defaults loaded or "enriched" with cross-references between its instances and the storage system.

This cache exists so that when instances are read in field_read_instances(), they have a fully loaded list of all fields in the system that they can reference to determine default values and if the field has been disabled.

Related topics

File

core/modules/field/field.info.inc, line 271
Field Info API, providing information about available fields and field types.

Code

function _field_read_fields_cache() {
  $definitions = &backdrop_static(__FUNCTION__);

  if (!isset($definitions)) {
    $definitions = field_read_fields(array(), array('include_deleted' => 1));
  }

  return $definitions;
}