1 file.module file_display_save($file_type, $view_mode, $display)

Saves a {file_display} array to config.

Related topics

File

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

Code

function file_display_save($file_type, $view_mode, $display) {
  $config = config('file_display.' . $file_type);
  $config->set('type', $file_type);
  $config->set($view_mode, $display);
  $config->save();

  file_info_cache_clear();
}