function mediafront_preset_select_form in MediaFront 7.2
Same name and namespace in other branches
- 6.2 mediafront.module \mediafront_preset_select_form()
- 6 mediafront.module \mediafront_preset_select_form()
- 7 mediafront.module \mediafront_preset_select_form()
Define the preset form selection.
4 calls to mediafront_preset_select_form()
- mediafront_field_formatter_settings_form in includes/
mediafront.field.inc - Implements hook_field_formatter_settings_form
- mediafront_file_formatter_settings in includes/
mediafront.field.inc - Implements hook_file_formatter_FORMATTER_settings().
- mediafront_handler_area_player::options_form in views/
mediafront_handler_area_player.inc - Default options form that provides the label widget that all fields should have.
- 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 372
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] : '',
);
}