You are here

function fc_field_collection_incomplete_process in Field Complete 7

1 string reference to 'fc_field_collection_incomplete_process'
field_collection.inc in plugins/fields/field_collection.inc

File

plugins/fields/field_collection.inc, line 44

Code

function fc_field_collection_incomplete_process($parent, $function, $cardinality, $items, $instance, $field) {
  $check_entities = !empty($instance['settings']['fc']['fc_check_entities']);
  $incomplete = new fcIncomplete($field['field_name'], $parent, 'field_collection_item');
  $completed = array();
  if ($check_entities) {
    foreach ($items as $delta => $item) {

      // Loads each field_collection to find out whether it is complete
      $field_collection = field_collection_item_revision_load($item['revision_id']);
      $sub = new fcIncomplete($instance['label'], $parent, 'field_collection_item', $field_collection);
      $sub
        ->process();
      $incomplete[] = $sub;
    }
  }
  $incomplete->complete = $cardinality($function, $items, $instance, $field);
  return $incomplete;
}