You are here

function node_gallery_api_get_fields_from_content_types in Node Gallery 7

Get all field info for content types.

2 calls to node_gallery_api_get_fields_from_content_types()
node_gallery_api_relationship_type_content_types_form in ./node_gallery_api.admin.inc
Form definition for relationship type content types.
node_gallery_api_relationship_type_settings_form in ./node_gallery_api.admin.inc
Form definition for Relationship Type settings form.

File

./node_gallery_api.admin.inc, line 229
Node Gallery API admin interface.

Code

function node_gallery_api_get_fields_from_content_types($types) {
  $fields = array();
  foreach ($types as $type) {
    $fields += field_info_instances('node', $type);
    $fields += field_info_extra_fields('node', $type, 'form');
  }
  foreach ($fields as $name => $field) {
    $fields[$name]['field_info'] = field_info_field($name);
  }
  uasort($fields, '_node_gallery_api_sort_fields_by_weight');
  return $fields;
}