You are here

function brightcove_video_edit in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 brightcove.video.inc \brightcove_video_edit()

Menu callback to display a video edit form.

Parameters

Entity $client:

string $video_id:

Return value

string

1 string reference to 'brightcove_video_edit'
brightcove_menu in ./brightcove.module
Implements hook_menu().

File

./brightcove.video.inc, line 654
Brightcove video related functions.

Code

function brightcove_video_edit($entity_type, $field_name, $entity_id, Entity $client, $video_id) {
  $video_entity = brightcove_video_load_by_video_id($video_id, $client);
  $entity_info = entity_get_info($entity_type);
  $bundle_key = $entity_info['entity keys']['bundle'];
  $entity = entity_load_single($entity_type, $entity_id);
  $bundle_name = $entity->{$bundle_key};
  $form = drupal_get_form('brightcove_video_form', $video_entity, $entity_type, $bundle_name, $field_name);
  return drupal_render($form);
}