You are here

function video_field_formatter_settings_form in Video 7

Same name and namespace in other branches
  1. 7.2 video.field.inc \video_field_formatter_settings_form()

Implements hook_field_formatter_settings_form().

File

./video.field.inc, line 376
Implement an video field, based on the file module's file field.

Code

function video_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $image_styles = image_style_options(FALSE);
  $element['video_style'] = array(
    '#title' => t('Video thumbnail style'),
    '#type' => 'select',
    '#default_value' => $settings['video_style'],
    '#empty_option' => t('None (original video thumbnail)'),
    '#options' => $image_styles,
  );
  $link_types = array(
    'content' => t('Content'),
    'file' => t('File'),
  );
  $element['video_link'] = array(
    '#title' => t('Link video or video thumbanil to'),
    '#type' => 'select',
    '#default_value' => $settings['video_link'],
    '#empty_option' => t('Nothing'),
    '#options' => $link_types,
  );
  return $element;
}