function brightcove_create_callback in Brightcove Video Connect 7.7
Same name and namespace in other branches
- 7.6 brightcove.module \brightcove_create_callback()
1 call to brightcove_create_callback()
File
- ./
brightcove.module, line 2621 - 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_create_callback($hash, $video_id, $client_id, $fid = 0, $parent_entity_type = '', $parent_field_name = '', $parent_bundle_name = '', $metadata = []) {
$callback = _brightcove_get_ingest_callback($hash);
if (!$callback) {
return FALSE;
}
db_insert('brightcove_callback')
->fields([
'id' => $video_id,
'expires' => time() + 60 * 60 * 24,
'fid' => $fid,
'hash' => $hash,
'client' => $client_id,
'parent_entity_type' => $parent_entity_type,
'parent_field_name' => $parent_field_name,
'parent_bundle_name' => $parent_bundle_name,
'metadata' => json_encode($metadata),
])
->execute();
return $callback;
}