video_embed_field.admin.inc 803 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Form builder; Form for editing a video style.
  4. * Used by CTools export ui
  5. *
  6. * @ingroup forms
  7. * @see video_embed_field_video_style_form_submit()
  8. */
  9. function video_embed_field_video_style_form(&$form, &$form_state) {
  10. if(isset($form_state['item'])){
  11. $style = (array) $form_state['item'];
  12. } else {
  13. $style = array();
  14. }
  15. $form_state['video_style'] = $style;
  16. //Grab the settings off the parser form
  17. $values = isset($style['data']) ? $style['data'] : array();
  18. $parser_form = video_embed_field_get_form($values);
  19. //General settings for playback - formerly in the configuration section
  20. $form['data'] = array(
  21. '#type' => 'vertical_tabs',
  22. '#title' => t('Playback settings'),
  23. '#tree' => TRUE,
  24. ) + $parser_form; //add in our extra settings
  25. return $form;
  26. }