stableversion-3.0
Last change
on this file since a8b1f3f was
177a560,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el directorio de modulos contribuidos de drupal
|
-
Propiedad mode establecida a
100644
|
File size:
1.1 KB
|
Línea | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * @file |
---|
4 | * Provide views data and handlers for poll.module |
---|
5 | */ |
---|
6 | |
---|
7 | /** |
---|
8 | * @defgroup views_poll_module poll.module handlers |
---|
9 | * |
---|
10 | * Includes only the core 'poll' table for now. |
---|
11 | * @{ |
---|
12 | */ |
---|
13 | |
---|
14 | /** |
---|
15 | * Implementation of hook_views_data() |
---|
16 | */ |
---|
17 | function poll_views_data() { |
---|
18 | // Basic table information. |
---|
19 | $data['poll']['table']['group'] = t('Poll'); |
---|
20 | |
---|
21 | // Join to 'node' as a base table. |
---|
22 | $data['poll']['table']['join'] = array( |
---|
23 | 'node' => array( |
---|
24 | 'left_field' => 'nid', |
---|
25 | 'field' => 'nid', |
---|
26 | ), |
---|
27 | ); |
---|
28 | |
---|
29 | // ---------------------------------------------------------------- |
---|
30 | // Fields |
---|
31 | |
---|
32 | // poll active status |
---|
33 | $data['poll']['active'] = array( |
---|
34 | 'title' => t('Active'), |
---|
35 | 'help' => t('Whether the poll is open for voting.'), |
---|
36 | 'field' => array( |
---|
37 | 'handler' => 'views_handler_field_boolean', |
---|
38 | 'click sortable' => TRUE, |
---|
39 | ), |
---|
40 | 'filter' => array( |
---|
41 | 'handler' => 'views_handler_filter_boolean_operator', |
---|
42 | 'label' => t('Active'), |
---|
43 | 'type' => 'yes-no', |
---|
44 | ), |
---|
45 | 'sort' => array( |
---|
46 | 'handler' => 'views_handler_sort', |
---|
47 | ), |
---|
48 | ); |
---|
49 | |
---|
50 | return $data; |
---|
51 | } |
---|
52 | |
---|
53 | /** |
---|
54 | * @} |
---|
55 | */ |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.