You are here

function ajax_browse_dialog_redirect_callback in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 brightcove.module \ajax_browse_dialog_redirect_callback()
1 string reference to 'ajax_browse_dialog_redirect_callback'
brightcove_field_browser_form in ./brightcove.module
Browse form. Will return a form for one video item.

File

./brightcove.module, line 1018
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_browse_dialog_redirect_callback($form, $form_state) {
  $entity_type = $form_state['values']['entity_type'];
  $field_name = $form_state['values']['field_name'];
  $entity_id_or_bundle = $form_state['values']['entity_id_or_bundle'];
  $bcid = $form_state['values']['bcid'];
  $id = $form_state['values']['id'];
  ctools_include('ajax');
  $commands = [];
  $commands[] = ctools_ajax_command_redirect("brightcove_field/edit_video/{$entity_type}/{$field_name}/{$entity_id_or_bundle}/{$bcid}/{$id}");
  return [
    '#type' => 'ajax',
    '#commands' => $commands,
  ];
}