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 380 - Admin page callbacks for the File module.
Code
function file_display_form_submit($form, &$form_state) {
$file_type = $form['#file_type'];
$view_mode = $form['#view_mode'];
$formatter = $form_state['values']['display']['formatter'];
$settings = isset($form_state['values']['display']['settings'][$formatter]) ? $form_state['values']['display']['settings'] : array();
$display = array(
'formatter' => $formatter,
'settings' => $settings,
);
file_display_save($form['#file_type'], $form['#view_mode'], $display);
backdrop_set_message(t('Your settings have been saved.'));
}