summaryrefslogtreecommitdiff
path: root/sites/all/modules/ds/ds.views.inc
blob: 5382fbdb28cdee35c09c01574583c477d5af3293 (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
<?php

/**
 * @file
 * Views hooks file.
 */

/**
 * Implements hook_views_plugins().
 */
function ds_views_plugins() {
  $path = drupal_get_path('module', 'ds');
  $views_plugins = array(
    'module' => 'ds',
    'row' => array(
      'ds' => array(
        'title' => t('Display Suite'),
        'help' => t('Display the entity with the Display Suite module.'),
        'handler' => 'views_plugin_ds_entity_view',
        'path' => $path . '/views',
        'base' => array('node', 'comment', 'users', 'apachesolr', 'taxonomy_term_data', 'file_managed', 'micro'),
        'theme' => 'ds_row_entity',
        'uses options' => TRUE,
        'type' => 'normal',
      ),
    ),
  );

  if (module_exists('ds_extras') && variable_get('ds_extras_vd')) {
    $views_plugins['row']['ds_fields'] = array(
      'uses fields' => TRUE,
      'title' => t('Display Suite fields'),
      'help' => t('Display fields through the Display Suite module.'),
      'handler' => 'views_plugin_ds_fields_view',
      'path' => $path . '/views',
      'theme' => 'ds_row_fields',
      'theme path' => $path . '/views',
      'theme file' => 'views_plugin_ds_fields_view.inc',
      'uses options' => TRUE,
      'type' => 'normal',
    );
  }

  return $views_plugins;
}