You are here

function ml_image_source_options_form in Media Library 6

Form for selection source options

1 string reference to 'ml_image_source_options_form'
ml_image_media_forms in ml_image/ml_image.module
Implementation of hook_media_forms()

File

ml_image/ml_image.module, line 270
Media Library Image module.

Code

function ml_image_source_options_form(&$form, &$form_state) {
  if ($form_state['action'] == 'update') {
    media_library_modal_skip_step($form_state);
  }
  $sources = ml_image_get_sources();

  // Source options
  $source = $form_state['media_obj']->source;
  $func_name = $sources[$source]['module'] . '_' . $source . '_options_form';
  if (function_exists($func_name)) {
    $form[$source] = $func_name($form_state);
  }
  else {

    // Skip the step
    media_library_modal_skip_step($form_state);
  }
  $form[$source]['#tree'] = TRUE;
}