You are here

function brightcove_metadata in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 brightcove.module \brightcove_metadata()
3 string references to 'brightcove_metadata'
brightcove_field_formatter_settings_form in ./brightcove.module
Impelements hook_field_formatter_settings_form().
brightcove_field_formatter_settings_summary in ./brightcove.module
Implements hook_field_formatter_settings_summary().
brightcove_field_formatter_view in ./brightcove.module
Implements hook_field_formatter_view().

File

./brightcove.module, line 2706
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_metadata($hash, callable $func) {
  if (!lock_acquire(__FUNCTION__)) {
    if (lock_wait(__FUNCTION__)) {
      return FALSE;
    }
    else {
      return brightcove_metadata($hash, $func);
    }
  }
  $metadata = brightcove_get_callback_metadata($hash);
  $new_metadata = $func($metadata);
  brightcove_update_callback_metadata($hash, $new_metadata);
  lock_release(__FUNCTION__);
  return TRUE;
}