/[drupal]/contributions/modules/video_upload/video_upload_field.inc
ViewVC logotype

Contents of /contributions/modules/video_upload/video_upload_field.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (show annotations) (download) (as text)
Sun Oct 11 22:06:52 2009 UTC (6 weeks, 3 days ago) by jhedstrom
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-7--1
Changes since 1.6: +0 -0 lines
File MIME type: text/x-php
Initital 7.x port.
1 <?php
2
3 // $Id: video_upload_field.inc,v 1.1.2.1 2009/02/26 22:10:44 jhedstrom Exp $
4
5 /**
6 * @file video_upload_field.inc
7 * Provides filefield hooks.
8 */
9
10 /**
11 * Provides views data to CCK.
12 */
13 function video_upload_video_upload_field_settings_views_data($field) {
14 $data = content_views_field_views_data($field);
15 $db_info = content_database_info($field);
16 $table_alias = content_views_tablename($field);
17
18 // Add a relationship for related file.
19 $data[$table_alias][$field['field_name'] .'_fid']['relationship'] = array(
20 'base' => 'files',
21 'field' => $db_info['columns']['fid']['column'],
22 'handler' => 'views_handler_relationship',
23 );
24
25 // Video status.
26 $data[$table_alias][$field['field_name'] . '_status'] = array(
27 'title' => t('Video status'),
28 'field' => $db_info['columns']['status']['column'],
29 'help' => t('Video Upload - Video status'),
30 'filter' => array(
31 'handler' => 'views_handler_filter_video_upload_status',
32 'label' => t('Video status'),
33 ),
34 );
35
36 // Video status timestamp.
37 $data[$table_alias][$field['field_name'] . '_status_ts']['filter'] = array(
38 'title' => t('Video status timestamp'),
39 'field' => $db_info['columns']['status_ts']['column'],
40 'help' => t('Video Upload - Video status timestamp'),
41 'filter' => array(
42 'handler' => 'views_handler_filter_date',
43 'label' => t('Video status timestamp'),
44 ),
45 );
46
47 return $data;
48 }

  ViewVC Help
Powered by ViewVC 1.1.2