function brightcove_field_browse in Brightcove Video Connect 7.4
Same name and namespace in other branches
- 7.7 brightcove_field.browse.inc \brightcove_field_browse()
- 7.2 brightcove_field/brightcove_field.browse.inc \brightcove_field_browse()
- 7.3 brightcove_field/brightcove_field.browse.inc \brightcove_field_browse()
- 7.5 brightcove_field/brightcove_field.browse.inc \brightcove_field_browse()
- 7.6 brightcove_field.browse.inc \brightcove_field_browse()
This function is a callback for modalframe window, providing an access to browse videos.
Parameters
none:
Return value
A list of available videos that can be attached to a field.
TODO: Allow limiting videos by user (own videos only). TODO: Interesting feature would be to detect multiple values allowed in the parent field and allow attaching all videos at once.
See also
1 string reference to 'brightcove_field_browse'
- brightcove_field_menu in brightcove_field/
brightcove_field.module - Implementation of hook_menu().
File
- brightcove_field/
brightcove_field.browse.inc, line 21 - Holds a method to list all BC videos that are attachable to a field.
Code
function brightcove_field_browse($type) {
$content = array();
drupal_add_css(drupal_get_path('module', 'brightcove_field') . '/styles/browse.css');
drupal_add_js(drupal_get_path('module', 'brightcove_field') . '/js/brightcove.js');
switch ($type) {
case 'video':
module_load_include('inc', 'brightcove_field', 'brightcove_field.video');
$content = _brightcove_field_video_browse();
break;
case 'playlist':
module_load_include('inc', 'brightcove_field', 'brightcove_field.playlist');
$content = _brightcove_field_playlist_browse();
break;
}
return '<div class="brightcove-browse-table">' . drupal_render($content['filter_form']) . $content['pager'] . theme('brightcove_field_browse_items', array(
'items' => $content['items'],
)) . $content['pager'] . '</div>';
}