You are here

function field_file_references in FileField 6.3

Same name and namespace in other branches
  1. 6.2 field_file.inc \field_file_references()

Return a count of the references to a file by all modules.

1 call to field_file_references()
filefield_widget_validate in ./filefield_widget.inc
An #element_validate callback for the filefield_widget field.

File

./field_file.inc, line 409
Common functionality for file handling CCK field modules.

Code

function field_file_references($file) {
  $references = (array) module_invoke_all('file_references', $file);
  $reference_count = 0;
  foreach ($references as $module => $count) {
    $reference_count += $count;
  }
  return $reference_count;
}