summaryrefslogtreecommitdiffstats
path: root/addthis.views.inc
blob: e98bfdd41fae2152d5f68d7921f9e97894cb105e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php

/**
 * @file
 * Provide views data and handlers for addthis.module
 */

/**
 * Implementation of hook_views_data().
 */
function addthis_views_data() {
  // We're registering the 'custom_teasers' table.
  $data['node']['addthis_button'] = array(
    'title' => t('AddThis button'),
    'help' => t('An AddThis button, associated with this node.'),
    'field' => array(
      'handler' => 'addthis_handler_field_button',
    ),
  );
  $data['node']['addthis_toolbox'] = array(
    'title' => t('AddThis toolbox'),
    'help' => t('An AddThis toolbox, associated with this node.'),
    'field' => array(
      'handler' => 'addthis_handler_field_toolbox',
    ),
  );
  return $data;
}

/**
 * Implementation of hook_views_handlers().
 */
function addthis_views_handlers() {
  return array(
    'info' => array(
      'path' => drupal_get_path('module', 'addthis'),
    ),
    'handlers' => array(
      'addthis_handler_field_button' => array(
        'parent' => 'views_handler_field',
        'file' => 'addthis_handler_field.inc',
      ),
      'addthis_handler_field_toolbox' => array(
        'parent' => 'views_handler_field',
        'file' => 'addthis_handler_field.inc',
      ),
    ),
  );
}