Projet

Général

Profil

Paste
Télécharger (571 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / modules / translation / views_handler_argument_node_tnid.inc @ 4003efde

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_handler_argument_node_tnid.
6
 */
7

    
8
/**
9
 * Argument handler to accept a node translation id.
10
 *
11
 * @ingroup views_argument_handlers
12
 */
13
class views_handler_argument_node_tnid extends views_handler_argument_numeric {
14

    
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function title_query() {
19
    $titles = array();
20

    
21
    $result = db_query("SELECT n.title FROM {node} n WHERE n.tnid IN (:tnids)", array(':tnids' => $this->value));
22
    foreach ($result as $term) {
23
      $titles[] = check_plain($term->title);
24
    }
25
    return $titles;
26
  }
27

    
28
}