You are here

function opigno_video_app_views_data in Opigno Video App 7

File

./opigno_video_app.module, line 217
Module hooks.

Code

function opigno_video_app_views_data() {
  $data['opigno_video_app_video_sort']['table']['group'] = t("Opigno Video App");
  $data['opigno_video_app_video_sort']['table']['join'] = array(
    'node' => array(
      'left_field' => 'nid',
      'field' => 'video_nid',
    ),
  );
  $data['opigno_video_app_video_sort']['gid'] = array(
    'title' => t("The Video group"),
    'relationship' => array(
      'base' => 'node',
      'base field' => 'nid',
      'handler' => 'views_handler_relationship',
      'label' => t("Group"),
    ),
  );
  $data['opigno_video_app_video_sort']['video_nid'] = array(
    'title' => t("The Video weight (as in order) inside a group"),
    'relationship' => array(
      'base' => 'node',
      'base field' => 'nid',
      'label' => t("Video"),
    ),
  );
  $data['opigno_video_app_video_sort']['weight'] = array(
    'title' => t("Video (as in order)"),
    'help' => t("The Video of the video inside a specific group"),
    'field' => array(
      'handler' => 'opigno_video_app_field_course_video_weight',
      'click sortable' => TRUE,
    ),
    'filter' => array(
      'handler' => 'opigno_video_app_field_course_video_weight',
    ),
    'sort' => array(
      'handler' => 'opigno_video_app_sort_course_video_weight',
    ),
    'argument' => array(
      'handler' => 'views_handler_argument_numeric',
    ),
  );
  return $data;
}