You are here

function nodereference_count_field in Nodereference Count 6

Implementation of cck hook_field().

File

./nodereference_count.module, line 94
Defines a field type for counting the references to a node.

Code

function nodereference_count_field($op, &$node, $field, &$node_field, $teaser, $page) {
  switch ($op) {
    case 'insert':
    case 'update':
      $node_field[0]['value'] = nodereference_count_get_count($field, $node->nid);
      break;
  }
}