You are here

function filefield_formatter_for_file in FileField 6.2

Determine which formatter will be used for displaying the edit form for the given file.

Return value

An array with info about the most appropriate file formatter, or NULL if no formatter is available to display this file.

1 call to filefield_formatter_for_file()
theme_filefield_unguarded in ./filefield.formatter.inc
Theme function for any file that is managed by filefield. It doesn't really format stuff by itself but rather redirects to other formatters that are telling us they want to handle the concerned file.

File

./filefield.module, line 603

Code

function filefield_formatter_for_file($file, $field) {
  $file_formatter_info = _filefield_file_formatter_info($field);
  $file = (object) $file;

  // other modules only get to see objects
  $suitability_args = array(
    $file,
    $field,
  );
  return _filefield_extension_for_file($file_formatter_info, $suitability_args);
}