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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Jan 26 23:56:49 2009 UTC (10 months ago) by brmassa
Branch: MAIN
CVS Tags: DRUPAL-6--2-01, DRUPAL-6--2-02, DRUPAL-6--2-03, DRUPAL-6--2-0, HEAD
File MIME type: text/x-php
New features:
* Complete module rewrite. It now uses Rules module in order to allow admins to perform a customizable list of actions with expired nodes. Also export all data to Views (if enabled) and uses jQuery UI DatePicker plugin (if enabled).

NOTE: not yet compatible with previous versions
1 <?php
2 // $Id: $
3
4 /**
5 * @file
6 * Views module integration.
7 */
8
9 /**
10 * Implementation of hook_views_data()
11 */
12 function node_expire_views_data() {
13 // Join to 'node' as a base table.
14 $data['node_expire']['table']['group'] = t('Node');
15 $data['node_expire']['table']['join'] = array(
16 'node' => array(
17 'left_field' => 'nid',
18 'field' => 'nid',
19 ),
20 );
21
22 $data['node_expire']['expire'] = array(
23 'title' => t('Expire date'),
24 'help' => t('Date of when the content expire.'),
25 'field' => array(
26 'handler' => 'views_handler_field_date',
27 'click sortable' => TRUE,
28 ),
29 'sort' => array(
30 'handler' => 'views_handler_sort_date',
31 ),
32 'filter' => array(
33 'handler' => 'views_handler_filter_date',
34 ),
35 );
36 $data['node_expire']['expired'] = array(
37 'title' => t('Expired'),
38 'help' => t('Whether the content is expired.'),
39 'field' => array(
40 'handler' => 'views_handler_field_boolean',
41 'click sortable' => TRUE,
42 ),
43 'filter' => array(
44 'handler' => 'views_handler_filter_boolean_operator',
45 'label' => t('Expired'),
46 'type' => 'yes-no',
47 ),
48 'sort' => array(
49 'handler' => 'views_handler_sort',
50 ),
51 );
52
53 return $data;
54 }

  ViewVC Help
Powered by ViewVC 1.1.2