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/taxonomy/views_handler_relationship_node_term_data.inc
10 10
 *
11 11
 * @ingroup views_relationship_handlers
12 12
 */
13
class views_handler_relationship_node_term_data extends views_handler_relationship  {
14
  function init(&$view, &$options) {
13
class views_handler_relationship_node_term_data extends views_handler_relationship {
14

  
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function init(&$view, &$options) {
15 19
    parent::init($view, $options);
16 20

  
17 21
    // Convert legacy vids option to machine name vocabularies.
......
25 29
    }
26 30
  }
27 31

  
28
  function option_definition() {
32
  /**
33
   * {@inheritdoc}
34
   */
35
  public function option_definition() {
29 36
    $options = parent::option_definition();
30 37
    $options['vocabularies'] = array('default' => array());
31 38
    return $options;
32 39
  }
33 40

  
34
  function options_form(&$form, &$form_state) {
41
  /**
42
   * {@inheritdoc}
43
   */
44
  public function options_form(&$form, &$form_state) {
35 45
    $vocabularies = taxonomy_get_vocabularies();
36 46
    $options = array();
37 47
    foreach ($vocabularies as $voc) {
......
51 61
  /**
52 62
   * Called to implement a relationship in a query.
53 63
   */
54
  function query() {
64
  public function query() {
55 65
    $this->ensure_my_table();
56 66

  
57 67
    $def = $this->definition;
......
65 75
      $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';
66 76
    }
67 77
    else {
68
      // If vocabularies are supplied join a subselect instead
78
      // If vocabularies are supplied join a subselect instead.
69 79
      $def['left_table'] = $this->table_alias;
70 80
      $def['left_field'] = 'nid';
71 81
      $def['field'] = 'nid';
......
89 99
    $join->construct();
90 100
    $join->adjusted = TRUE;
91 101

  
92
    // use a short alias for this:
102
    // Use a short alias for this.
93 103
    $alias = $def['table'] . '_' . $this->table;
94 104

  
95 105
    $this->alias = $this->query->add_relationship($alias, $join, 'taxonomy_term_data', $this->relationship);
96 106
  }
107

  
97 108
}

Formats disponibles : Unified diff