You are here

function video_theme in Video 7

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.2 video.module \video_theme()

Implementation of hook_theme().

File

./video.module, line 66

Code

function video_theme() {
  $theme = array();
  $theme['video'] = array(
    'variables' => array(
      'item' => NULL,
      'path' => NULL,
      'video_style' => NULL,
      'entity' => NULL,
      'field' => NULL,
      'instance' => NULL,
    ),
    'file' => 'video.theme.inc',
  );
  $theme['video_thumbnail'] = array(
    'variables' => array(
      'item' => NULL,
      'path' => NULL,
      'video_style' => NULL,
      'entity' => NULL,
      'field' => NULL,
      'instance' => 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
  $players = video_video_players();
  foreach ($players as $tpl => $value) {
    $theme[$tpl] = array(
      'variables' => array(
        'video' => NULL,
        'themed_output' => 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(
      'video' => NULL,
    ),
    'file' => 'video.theme.inc',
  );
  $theme['video_html5'] = array(
    'variables' => array(
      'video' => NULL,
    ),
    'file' => 'video.theme.inc',
  );
  return $theme;
}