You are here

function file_display_new in File Entity (fieldable files) 7

Same name and namespace in other branches
  1. 7.3 file_entity.file_api.inc \file_display_new()
  2. 7.2 file_entity.file_api.inc \file_display_new()

Creates a new {file_display} object.

1 call to file_display_new()
file_entity_file_display_form_submit in ./file_entity.admin.inc
Process file display settings form submissions.

File

./file_entity.file_api.inc, line 408
API extensions of Drupal core's file.inc.

Code

function file_display_new($file_type, $view_mode, $formatter_name) {
  ctools_include('export');
  $display = ctools_export_crud_new('file_display');
  $display->name = implode('__', array(
    $file_type,
    $view_mode,
    $formatter_name,
  ));
  return $display;
}