Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc
2 2

  
3 3
/**
4 4
 * @file
5
 * Contains the node RSS row style plugin.
5
 * Definition of views_plugin_row_comment_view.
6 6
 */
7 7

  
8 8
/**
9 9
 * Plugin which performs a comment_view on the resulting object.
10 10
 */
11 11
class views_plugin_row_comment_view extends views_plugin_row {
12
  var $base_field = 'cid';
13
  var $base_table = 'comment';
12

  
13
  /**
14
   * {@inheritdoc}
15
   */
16
  public $base_field = 'cid';
17

  
18
  /**
19
   * {@inheritdoc}
20
   */
21
  public $base_table = 'comment';
14 22

  
15 23
  /**
16 24
   * Stores all comments which are preloaded.
17 25
   */
18
  var $comments = array();
26
  public $comments = array();
19 27

  
20 28
  /**
21 29
   * Stores all nodes of all comments which are preloaded.
22 30
   */
23
  var $nodes = array();
31
  public $nodes = array();
24 32

  
25
  function summary_title() {
33
  /**
34
   * {@inheritdoc}
35
   */
36
  public function summary_title() {
26 37
    return t('Settings');
27 38
  }
28 39

  
29
  function option_definition() {
40
  /**
41
   * {@inheritdoc}
42
   */
43
  public function option_definition() {
30 44
    $options = parent::option_definition();
31 45
    $options['links'] = array('default' => TRUE, 'bool' => TRUE);
32 46
    $options['view_mode'] = array('default' => 'full');
33 47
    return $options;
34 48
  }
35 49

  
36
  function options_form(&$form, &$form_state) {
50
  /**
51
   * {@inheritdoc}
52
   */
53
  public function options_form(&$form, &$form_state) {
37 54
    parent::options_form($form, $form_state);
38 55

  
39 56
    $options = $this->options_form_summary_options();
......
51 68
    );
52 69
  }
53 70

  
54

  
55 71
  /**
56 72
   * Return the main options, which are shown in the summary title.
57 73
   */
58
  function options_form_summary_options() {
74
  public function options_form_summary_options() {
59 75
    $entity_info = entity_get_info('comment');
60 76
    $options = array();
61 77
    if (!empty($entity_info['view modes'])) {
......
72 88
    return $options;
73 89
  }
74 90

  
75
  function pre_render($result) {
91
  /**
92
   * {@inheritdoc}
93
   */
94
  public function pre_render($result) {
76 95
    $cids = array();
77 96

  
78 97
    foreach ($result as $row) {
......
94 113
      $this->nodes[$node->nid] = $node;
95 114
    }
96 115
  }
116

  
97 117
}

Formats disponibles : Unified diff