1 file.module file_build_content($file, $view_mode = 'full', $langcode = NULL)

Builds a structured array representing the file's content.

Parameters

object $file: A file object.

string $view_mode: View mode, e.g. 'default', 'full', etc.

string $langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request.

File

core/modules/file/file.module, line 3271
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_build_content($file, $view_mode = 'full', $langcode = NULL) {
  $file->buildContent($view_mode, $langcode);
}