You are here

function video_theme in Video 7.2

Same name and namespace in other branches
  1. 8.2 video.module \video_theme()
  2. 8 video.module \video_theme()
  3. 6.5 video.module \video_theme()
  4. 6 video.module \video_theme()
  5. 6.2 video.module \video_theme()
  6. 6.4 video.module \video_theme()
  7. 7 video.module \video_theme()

Implements hook_theme().

File

./video.module, line 130
All module hooks implementation can be found in this file.

Code

function video_theme() {
  $theme = array();
  $theme['video_formatter_player'] = array(
    'variables' => array(
      'item' => NULL,
      'entity' => NULL,
      'entity_type' => NULL,
      'field' => NULL,
      'instance' => NULL,
      'player_dimensions' => NULL,
      'poster_image_style' => NULL,
    ),
    'file' => 'video.theme.inc',
  );
  $theme['video_formatter_thumbnail'] = array(
    'variables' => array(
      'item' => NULL,
      'path' => NULL,
      'image_style' => NULL,
      'entity' => NULL,
      'entity_type' => NULL,
      'field' => NULL,
      'instance' => NULL,
      'colorbox' => NULL,
    ),
    'file' => 'video.theme.inc',
  );
  $theme['video_widget'] = array(
    'render element' => 'element',
    'file' => 'video.theme.inc',
  );
  $theme['video_conversion_failed'] = array(
    'variables' => array(),
    'file' => 'video.theme.inc',
  );
  $theme['video_inprogress'] = array(
    'variables' => array(),
    'file' => 'video.theme.inc',
  );
  $path = drupal_get_path('module', 'video') . '/theme';

  // Lets setup our themes for our players
  // We include video.utility.inc here, because when upgrading the autoload cache is not updated yet.
  module_load_include('utility.inc', 'video');
  $players = array_keys(video_utility::getVideoPlayers());
  $players[] = 'video_play_html5_audio';
  foreach ($players as $tpl) {
    $theme[$tpl] = array(
      'variables' => array(
        'item' => NULL,
        'width' => NULL,
        'height' => NULL,
      ),
      'template' => str_replace('_', '-', $tpl),
      'path' => $path,
    );
  }

  // We need to add an flv theme buffer to allow users to override in their own module to add in extra parameters before
  // calling our flv template file.
  $theme['video_flv'] = array(
    'variables' => array(
      'item' => NULL,
      'themed_output' => NULL,
    ),
    'file' => 'video.theme.inc',
  );
  $theme['video_html5'] = array(
    'variables' => array(
      'item' => NULL,
      'width' => NULL,
      'height' => NULL,
    ),
    'file' => 'video.theme.inc',
  );

  // Dialog page.
  $theme['video_dialog_page'] = array(
    'render element' => 'page',
    'template' => 'templates/video-dialog-page',
    'file' => 'video.theme.inc',
  );
  return $theme;
}