You are here

function brightcove_mm_complete_config in Brightcove Video Connect 6

Same name and namespace in other branches
  1. 6.2 brightcove.media_mover.inc \brightcove_mm_complete_config()

Media Mover configuration form element for Brightcove.

1 call to brightcove_mm_complete_config()
brightcove_media_mover in ./brightcove.module
Implementation of hook_media_mover().

File

./brightcove.media_mover.inc, line 89
Functions to implement Media Mover behavior for Brightcove.

Code

function brightcove_mm_complete_config($configuration) {
  $form['brightcove_mm_complete_config'] = array(
    '#type' => 'fieldset',
    '#title' => t('Attach Brightcove video to a CCK video field configuration'),
    '#element_validate' => array(
      'brightcove_mm_complete_validate_configuration',
      array(
        'brightcove_mm_complete_config',
      ),
    ),
  );
  $fields = array();
  foreach (content_fields() as $field) {
    if ($field['type'] == 'brightcove_video') {
      $fields[$field['field_name']] = $field['widget']['label'] . " (" . $field['field_name'] . ')';
    }
  }
  $form['brightcove_mm_complete_config']['brightcove_mm_config_complete_field'] = array(
    '#type' => 'select',
    '#title' => t('Attach to these CCK fields'),
    '#description' => t('Select the CCK fields to attach uploaded videos to.'),
    '#options' => $fields,
    '#default_value' => $configuration['brightcove_mm_config_complete_field'],
  );
  return $form;
}