You are here

function brightcove_field_browser_form in Brightcove Video Connect 7.6

Same name and namespace in other branches
  1. 7.7 brightcove.module \brightcove_field_browser_form()
  2. 7.2 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
  3. 7.3 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
  4. 7.4 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
  5. 7.5 brightcove_field/brightcove_field.module \brightcove_field_browser_form()

Browse form. Will return a form for one video item.

See also

brightcove_field_forms().

2 string references to 'brightcove_field_browser_form'
brightcove_forms in ./brightcove.module
Implementation of hook_forms().
theme_brightcove_field_browse_item in ./theme.inc
Theme callback for Brightcove browse table item.

File

./brightcove.module, line 1384
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function brightcove_field_browser_form($form, &$form_state, $item, $entity_type, $field_name, $entity_id_or_bundle, $bcid) {
  $form['id'] = [
    '#type' => 'value',
    '#default_value' => $item['brightcove_id'],
  ];
  $form['entity_type'] = [
    '#type' => 'value',
    '#default_value' => $entity_type,
  ];
  $form['field_name'] = [
    '#type' => 'value',
    '#default_value' => $field_name,
  ];
  $form['entity_id_or_bundle'] = [
    '#type' => 'value',
    '#default_value' => $entity_id_or_bundle,
  ];
  $form['bcid'] = [
    '#type' => 'value',
    '#default_value' => $bcid,
  ];
  $form['title'] = [
    '#type' => 'value',
    '#default_value' => $item['title'],
  ];
  $form['text_title'] = [
    '#prefix' => '<div class="brightcove-title">',
    '#suffix' => '</div>',
    '#markup' => $item['title'],
  ];
  $form['text_image'] = [
    '#prefix' => '<div class="brightcove-image">',
    '#suffix' => '</div>',
    '#markup' => $item['thumbnail'],
  ];
  $form['attach'] = [
    '#type' => 'submit',
    '#name' => 'attach-' . $item['brightcove_id'],
    '#default_value' => t('Attach'),
    '#ajax' => [
      'callback' => 'ajax_browse_dialog_close_callback',
    ],
  ];
  $form['edit'] = [
    '#type' => 'submit',
    '#name' => 'edit-' . $item['brightcove_id'],
    '#default_value' => t('Edit'),
    '#ajax' => [
      'callback' => 'ajax_browse_dialog_redirect_callback',
    ],
  ];
  return $form;
}