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

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

// Parent plugin.
if (module_exists('comment')) {
  $plugin = array(
    'name' => 'comment',
    'base_table' => 'comment',
    'created_column' => 'created',
    'form_wizard_class' => array(
      'file' => 'views_ui_comment_views_wizard.class.php',
      'class' => 'ViewsUiCommentViewsWizard',
    ),
    'title' => t('Comments'),
    'filters' => array(
      'status' => array(
        'value' => COMMENT_PUBLISHED,
        'table' => 'comment',
        'field' => 'status',
      ),
      'status_node' => array(
        'value' => NODE_PUBLISHED,
        'table' => 'node',
        'field' => 'status',
        'relationship' => 'nid',
      ),
    ),
    'path_field' => array(
      'id' => 'cid',
      'table' => 'comment',
      'field' => 'cid',
      'exclude' => TRUE,
      'link_to_comment' => FALSE,
      'alter' => array(
        'alter_text' => 1,
        'text' => 'comment/[cid]#comment-[cid]',
      ),
    ),
  );
}