You are here

function scald_file_default_thumbnail_handler in Scald File Provider 7

Handler to store the default thumbnail generation option in the atom Entity.

1 string reference to 'scald_file_default_thumbnail_handler'
scald_file_form_scald_atom_add_form_options_alter in ./scald_file.module
Implements hook_form_FORM_ID_alter().

File

./scald_file.module, line 160
Scald File is a Scald Atom Provider for Files.

Code

function scald_file_default_thumbnail_handler(&$form, &$form_state) {
  foreach ($form as $key => $data) {
    if (strpos($key, 'atom') === 0) {
      $index = intval(substr($key, 4));
      $form_state['scald']['atoms'][$index]->data['scald_thumbnail_default'] = $form_state['values'][$key]['scald_thumbnail_default'];
    }
  }
}