You are here

function ajax_edit_video_dialog_close_callback in Brightcove Video Connect 7.6

Same name and namespace in other branches
  1. 7.7 brightcove.module \ajax_edit_video_dialog_close_callback()
1 string reference to 'ajax_edit_video_dialog_close_callback'
brightcove_video_form in ./brightcove.video.inc
Brightcove video entity form.

File

./brightcove.module, line 1145
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 ajax_edit_video_dialog_close_callback($form, $form_state) {
  $id = _brightcove_edit_form_callback($form, $form_state);
  $selector = '#browse-dialog';
  $data_title = check_plain($form_state['values']['title']);
  $data_id = check_plain($id);
  $data = $id ? "{$data_title} [id:{$data_id}]" : '';
  $dialog_type = 'browse';
  $commands = [];
  $commands[] = ajax_command_close_dialog($selector, $data, NULL, $dialog_type);
  return [
    '#type' => 'ajax',
    '#commands' => $commands,
  ];
}