You are here

function kaltura_views_tables in Kaltura 5

File

plugins/kaltura_views/kaltura_views.module, line 10

Code

function kaltura_views_tables() {
  $tables = array();
  $table = array(
    'name' => 'node_kaltura',
    'title' => 'kaltura nodes',
    'provider' => 'internal',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid',
      ),
      'right' => array(
        'field' => 'nid',
      ),
    ),
    'fields' => array(
      'kaltura_entryId' => array(
        'name' => t('Kaltura: Media ID'),
        'sortable' => FALSE,
        'help' => t('Display the ID of a Kaltura Media item.'),
      ),
      'kaltura_plays' => array(
        'name' => t('Kaltura: Plays'),
        'sortable' => TRUE,
        'help' => t('Display the number of time a Kaltura item was played'),
      ),
      'kaltura_views' => array(
        'name' => t('Kaltura: Views'),
        'sortable' => TRUE,
        'help' => t('Display the number of time a Kaltura item was viewed'),
      ),
      'kaltura_media_type' => array(
        'name' => t('Kaltura: Media Type'),
        'sortable' => TRUE,
        'help' => t('Display the type of a Kaltura item'),
        'handler' => 'view_handler_field_kaltura_media_type',
      ),
      'kaltura_admin_tags' => array(
        'name' => t('Kaltura: Admin Tags'),
        'help' => t(''),
      ),
      'kaltura_tags' => array(
        'name' => t('Kaltura: Tags'),
        'help' => t(''),
      ),
      'kaltura_duration' => array(
        'name' => t('Kaltura: Duration'),
        'help' => t('Kaltura item duration (in seconds)'),
      ),
      'kaltura_media_date' => array(
        'name' => t('Kaltura: Media Date'),
        'help' => t('kaltura image item media date (EXIF data)'),
      ),
      'kaltura_thumbnail_url' => array(
        'help' => t('kaltura item thumbnail'),
        'name' => t('Kaltura: Thumbnail'),
        'handler' => 'views_handler_field_kaltura_thumb',
        'option' => array(
          '#type' => 'textfield',
          '#title' => 'Thumbnail Dimensions',
          '#size' => 20,
          '#description' => t('input format must be {width}x{height} e.g. 120x90'),
          '#default_value' => '120x90',
        ),
      ),
      'kaltura_source_link' => array(
        'help' => t('kaltura item source link'),
        'name' => t('Kaltura: Source Link'),
      ),
      'kaltura_download_url' => array(
        'help' => t('kaltura item download link'),
        'name' => t('Kaltura: Download URL'),
        'handler' => 'views_handler_field_url',
      ),
      'kaltura_total_rank' => array(
        'name' => t('Kaltura: Total Rank'),
        'help' => t('total rank is rank multiplied by 1000'),
        'sortable' => FALSE,
      ),
      'kaltura_rank' => array(
        'name' => t('Kaltura: Rank'),
        'help' => t(''),
        'sortable' => FALSE,
      ),
      'kaltura_votes' => array(
        'name' => t('Kaltura: Votes'),
        'help' => t('kaltura item number of votes'),
        'sortable' => FALSE,
      ),
      'kaltura_video_comment' => array(
        'help' => t('was the Kaltura node created when adding a comment on another node'),
        'name' => t('Kaltura: Is Comment'),
        'sortable' => TRUE,
      ),
    ),
    'filters' => array(
      'kaltura_media_type' => array(
        'name' => t('Kaltura: Media Type'),
        'operator' => 'views_handler_operator_or',
        'list' => 'views_handler_filter_kaltura_media_type_form',
        'list-type' => 'list',
        'value-type' => 'array',
        'help' => t('This filter allows you to filter by the Kaltura item media type.'),
      ),
      'kaltura_plays' => array(
        'name' => t('Kaltura: Plays'),
        'operator' => 'views_handler_operator_gtlt',
        'option' => 'integer',
      ),
      'kaltura_views' => array(
        'name' => t('Kaltura: Views'),
        'operator' => 'views_handler_operator_gtlt',
        'option' => 'integer',
      ),
      'kaltura_admin_tags' => array(
        'name' => t('Kaltura: Admin Tags'),
        'operator' => 'views_handler_operator_like',
        'handler' => 'views_handler_filter_like',
        'help' => t(''),
      ),
      'kaltura_tags' => array(
        'name' => t('Kaltura: Tags'),
        'operator' => 'views_handler_operator_like',
        'handler' => 'views_handler_filter_like',
        'help' => t(''),
      ),
      'kaltura_duration' => array(
        'name' => t('Kaltura: Duration'),
        'operator' => 'views_handler_operator_gtlt',
        'option' => 'integer',
      ),
      'kaltura_total_rank' => array(
        'name' => t('Kaltura: Total Rank'),
        'help' => t('total rank is rank multiplied by 1000'),
        'operator' => 'views_handler_operator_gtlt',
        'option' => 'integer',
      ),
      'kaltura_rank' => array(
        'name' => t('Kaltura: Rank'),
        'help' => t(''),
        'operator' => 'views_handler_operator_gtlt',
        'option' => 'integer',
      ),
      'kaltura_votes' => array(
        'name' => t('Kaltura: Votes'),
        'help' => t('kaltura item number of votes'),
        'operator' => 'views_handler_operator_gtlt',
        'option' => 'integer',
      ),
      'kaltura_video_comment' => array(
        'help' => t('was the Kaltura node created when adding a comment on another node'),
        'name' => t('Kaltura: Is Comment'),
        'operator' => array(
          '=' => t('Equals'),
        ),
        'list' => 'views_handler_operator_yesno',
        'list-type' => 'select',
      ),
    ),
    'sorts' => array(
      'kaltura_media_type' => array(
        'name' => t('Kaltura: Media Type'),
        'handler' => 'views_handler_sort',
      ),
      'kaltura_plays' => array(
        'name' => t('Kaltura: Plays'),
        'handler' => 'views_handler_sort',
      ),
      'kaltura_admin_tags' => array(
        'name' => t('Kaltura: Admin Tags'),
        'handler' => 'views_handler_sort',
      ),
      'kaltura_tags' => array(
        'name' => t('Kaltura: Tags'),
        'handler' => 'views_handler_sort',
      ),
      'kaltura_duration' => array(
        'name' => t('Kaltura: Duration'),
        'help' => t('sort by length of video/show (in seconds)'),
      ),
      'kaltura_total_rank' => array(
        'name' => t('Kaltura: Total Rank'),
        'help' => t('total rank is rank multiplied by 1000'),
      ),
      'kaltura_rank' => array(
        'name' => t('Kaltura: Rank'),
        'help' => t(''),
      ),
      'kaltura_votes' => array(
        'name' => t('Kaltura: Votes'),
        'help' => t('kaltura item number of votes'),
      ),
    ),
  );
  $tables['node_kaltura'] = $table;
  return $tables;
}