video_embed_field.admin.inc 808 B

12345678910111213141516171819202122232425262728293031
  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. }
  13. else {
  14. $style = array();
  15. }
  16. $form_state['video_style'] = $style;
  17. //Grab the settings off the parser form
  18. $values = isset($style['data']) ? $style['data'] : array();
  19. $parser_form = video_embed_field_get_form($values);
  20. //General settings for playback - formerly in the configuration section
  21. $form['data'] = array(
  22. '#type' => 'vertical_tabs',
  23. '#title' => t('Playback settings'),
  24. '#tree' => TRUE,
  25. ) + $parser_form; //add in our extra settings
  26. return $form;
  27. }