1 file.admin.inc file_display_form_submit($form, &$form_state)

Process file display settings form submissions.

File

core/modules/file/file.admin.inc, line 369
File type editing user interface.

Code

function file_display_form_submit($form, &$form_state) {
  $file_type = $form['#file_type'];
  $view_mode = $form['#view_mode'];

  $display = array(
    'formatter' => $form_state['values']['display']['formatter'],
    'settings' => $form_state['values']['display']['settings'],
  );

  file_display_save($form['#file_type'], $form['#view_mode'], $display);
  backdrop_set_message(t('Your settings have been saved.'));
}