You are here

function noderelationships_content_fieldapi in Node Relationships 6

Implementation of hook_content_fieldapi().

File

./noderelationships.module, line 291
This is the main script for the noderelationships module. It merely contains the implementation of hooks invoked by Drupal core, CCK, Views, etc. All common functions are externalized into several scripts that are included on demand.

Code

function noderelationships_content_fieldapi($op, $field) {

  // Watch for changes in nodereference fields.
  if ($op != 'read instance' && $field['type'] == 'nodereference') {
    module_load_include('inc', 'noderelationships');
    if ($op == 'delete instance') {

      // Delete relations related to this field instance.
      noderelationships_settings_delete_nodereference($field['type_name'], $field['field_name']);
    }

    // Clear cached information about relationships (all operations).
    noderelationships_cache_clear();
  }
}