You are here

function video_embed_get_handlers in Video Embed Field 7

Same name and namespace in other branches
  1. 7.2 video_embed_field.module \video_embed_get_handlers()

Creates a hook that other modules can implement to get handlers - hook_video_embed_handler_info Can be used to add more handlers if needed - from other modules and such

See also

video_embed_field.api.php for more information

4 calls to video_embed_get_handlers()
video_embed_field_field_formatter_prepare_view in ./video_embed_field.module
Implementation of hook_field_formatter_prepare_view Prepare the view of the video embed - if the embed code doesn't exist, create it using the url
video_embed_field_field_validate in ./video_embed_field.module
video_embed_field_filter_process in ./video_embed_field.module
Video Embed Field filter process callback
video_embed_field_get_form in ./video_embed_field.module
Create a form from the player configuration options $defaults will be passed in with the default settings for the various fields

File

./video_embed_field.module, line 269

Code

function video_embed_get_handlers() {
  $handlers = cache_get('video_embed_field_handlers');
  if ($handlers === FALSE) {
    $available = module_invoke_all('video_embed_handler_info');
    foreach ($available as $handler) {
      $handlers[$handler['domain']] = $handler;
    }
    drupal_alter('video_embed_field_handlers', $handlers);
    cache_set('video_embed_field_handlers', $handlers);
  }
  else {
    $handlers = $handlers->data;
  }
  return $handlers;
}