Projet

Général

Profil

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

root / drupal7 / sites / all / modules / views / modules / taxonomy / views_handler_argument_taxonomy.inc @ 4003efde

1
<?php
2

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

    
8
/**
9
 * Argument handler for basic taxonomy tid.
10
 *
11
 * @ingroup views_argument_handlers
12
 */
13
class views_handler_argument_taxonomy extends views_handler_argument_numeric {
14

    
15
  /**
16
   * Override the behavior of title(). Get the title of the node.
17
   */
18
  public function title() {
19
    // There might be no valid argument.
20
    if ($this->argument) {
21
      $term = taxonomy_term_load($this->argument);
22
      if (!empty($term)) {
23
        return check_plain($term->name);
24
      }
25
    }
26
    // @todo review text.
27
    return t('No name');
28
  }
29

    
30
}