Projet

Général

Profil

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

root / drupal7 / sites / all / modules / views / modules / aggregator / views_handler_argument_aggregator_fid.inc @ 5d12d676

1
<?php
2

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

    
8
/**
9
 * Argument handler to accept an aggregator feed id.
10
 *
11
 * @ingroup views_argument_handlers
12
 */
13
class views_handler_argument_aggregator_fid extends views_handler_argument_numeric {
14

    
15
  /**
16
   * Override the behavior of title(). Get the title of the feed.
17
   */
18
  public function title_query() {
19
    $titles = array();
20

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

    
28
}