You are here

function fc_node_reference_incomplete_process in Field Complete 7

1 string reference to 'fc_node_reference_incomplete_process'
node_reference.inc in plugins/fields/node_reference.inc

File

plugins/fields/node_reference.inc, line 39

Code

function fc_node_reference_incomplete_process($parent, $function, $cardinality, $items, $instance, $field) {
  $check_nodes = !empty($instance['settings']['fc']['fc_check_nodes']);
  $incomplete = new fcIncomplete($instance['field_name'], $parent, 'node');
  $completed = array();
  if ($check_nodes) {
    foreach ($items as $item) {

      // Loads each entity to find out whether it is complete
      $node = node_load($item['nid']);
      $sub = new fcIncomplete('', $parent, 'node', $node);
      $sub
        ->process();
      $incomplete[] = $sub;
    }
  }
  $incomplete->complete = $cardinality($function, $items, $instance, $field);
  return $incomplete;
}