summaryrefslogtreecommitdiff
path: root/sites/all/modules/views/plugins/views_wizard/node.inc
blob: ccca48dec999114ee95105e10aed6b635765537d (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
<?php

/**
 * @file
 * Views wizard for node views.
 */

$plugin = array(
  'name' => 'node',
  'base_table' => 'node',
  'created_column' => 'created',
  'available_sorts' => array(
    'title:DESC' => t('Title')
  ),
  'form_wizard_class' => array(
    'file' => 'views_ui_node_views_wizard.class.php',
    'class' => 'ViewsUiNodeViewsWizard',
  ),
  'title' => t('Content'),
  'filters' => array(
    'status' => array(
      'value' => NODE_PUBLISHED,
      'table' => 'node',
      'field' => 'status',
    ),
  ),
  'path_field' => array(
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'exclude' => TRUE,
    'link_to_node' => FALSE,
    'alter' => array(
      'alter_text' => 1,
      'text' => 'node/[nid]',
    ),
  ),
);

if (module_exists('statistics')) {
  $plugin['available_sorts']['node_counter-totalcount:DESC'] = t('Number of hits');
}