function brightcove_field_browser_form in Brightcove Video Connect 7.6
Same name and namespace in other branches
- 7.7 brightcove.module \brightcove_field_browser_form()
- 7.2 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
- 7.3 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
- 7.4 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
- 7.5 brightcove_field/brightcove_field.module \brightcove_field_browser_form()
Browse form. Will return a form for one video item.
See also
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;
}