/[drupal]/contributions/modules/role_weights/role_weights.views.inc
ViewVC logotype

Contents of /contributions/modules/role_weights/role_weights.views.inc

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


Revision 1.3 - (show annotations) (download) (as text)
Tue Jul 7 19:06:23 2009 UTC (4 months, 2 weeks ago) by leafishpaul
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +17 -5 lines
File MIME type: text/x-php
Join to node_revisions and users too.
1 <?php
2 // $Id: role_weights.views.inc,v 1.2 2009/06/09 16:05:26 leafishpaul Exp $
3
4 function role_weights_views_data() {
5
6 $data['role_weights']['table']['group'] = t('User');
7
8 $data['role_weights']['table']['join'] = array(
9 'users' => array(
10 'left_table' => 'users_roles',
11 'left_field' => 'rid',
12 'field' => 'rid',
13 ),
14 'node' => array(
15 'left_table' => 'users_roles',
16 'left_field' => 'rid',
17 'field' => 'rid',
18 ),
19 'node_revisions' => array(
20 'left_table' => 'users_roles',
21 'left_field' => 'rid',
22 'field' => 'rid',
23 ),
24 );
25
26 $data['role_weights']['weight'] = array(
27 'title' => t('Role weight'),
28 'help' => t("User's role weight."),
29 'field' => array(
30 'handler' => 'views_handler_field_numeric',
31 'click sortable' => TRUE,
32 ),
33 'filter' => array(
34 'handler' => 'views_handler_filter_numeric',
35 ),
36 'sort' => array(
37 'handler' => 'views_handler_sort',
38 ),
39 );
40
41 return $data;
42 }
43

  ViewVC Help
Powered by ViewVC 1.1.2