You are here

function mediafront_preset_select_form in MediaFront 6.2

Same name and namespace in other branches
  1. 6 mediafront.module \mediafront_preset_select_form()
  2. 7.2 mediafront.module \mediafront_preset_select_form()
  3. 7 mediafront.module \mediafront_preset_select_form()

Define the preset form selection.

3 calls to mediafront_preset_select_form()
mediafront_block_configure in ./mediafront.module
Implementation of hook_block_configure
mediafront_handler_field_player::options_form in views/mediafront_handler_field_player.inc
Provide link to the page being visited.
mediafront_plugin_style_player::options_form in views/mediafront_plugin_style_player.inc
Shows the options form for the media player style

File

./mediafront.module, line 476

Code

function mediafront_preset_select_form($default, $key = 'mediafront_preset') {
  $presets = mediafront_preset_get_presets();
  $options = array();
  foreach ($presets as $preset) {
    $options[$preset['name']] = $preset['name'];
  }
  return array(
    '#type' => 'select',
    '#title' => t('MediaFront Presets'),
    '#options' => $options,
    '#default_value' => isset($default[$key]) ? $default[$key] : '',
  );
}