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

Diff of /contributions/modules/fasttoggle/views/fasttoggle.views.inc

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

revision 1.1, Tue Mar 31 12:12:01 2009 UTC revision 1.1.2.1, Tue Mar 31 12:12:01 2009 UTC
# Line 0  Line 1 
1    <?php
2    
3    /**
4     * Implementation of hook_views_data_alter()
5     */
6    
7    function fasttoggle_views_data_alter(&$data) {
8    
9      $data['node']['publish_node'] = array(
10        'field' => array(
11          'title' => t('Publish Link (Fasttoggle)'),
12          'help' => t('Provide a simple link to publish the node.'),
13          'handler' => 'fasttoggle_views_handler_field_node_link',
14          'fasttoggle' => array(
15            'key' => 'status',
16          ),
17        ),
18      );
19      $data['node']['promote_node'] = array(
20        'field' => array(
21          'title' => t('Promote Link (Fasttoggle)'),
22          'help' => t('Provide a simple link to promote the node.'),
23          'handler' => 'fasttoggle_views_handler_field_node_link',
24          'fasttoggle' => array(
25            'key' => 'promote',
26            'additional_fields' => array('promote' => 'promote'),
27          ),
28        ),
29      );
30      $data['node']['sticky_node'] = array(
31        'field' => array(
32          'title' => t('Sticky Link (Fasttoggle)'),
33          'help' => t('Provide a simple link to make the node sticky.'),
34          'handler' => 'fasttoggle_views_handler_field_node_link',
35          'fasttoggle' => array(
36            'key' => 'sticky',
37            'additional_fields' => array('sticky' => 'sticky'),
38          ),
39        ),
40      );
41    }
42    
43    /**
44     * Field handler to present a link toggle status.
45     */
46    function fasttoggle_views_handlers() {
47      return array(
48        'info' => array(
49          'path' => drupal_get_path('module', 'fasttoggle') . '/views',
50        ),
51        'handlers' => array(
52          'fasttoggle_views_handler_field_node_link' => array(
53            'parent' => 'views_handler_field_node_link',
54          ),
55        ),
56      );
57    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2