views_handler_argument_aggregator_fid.inc

  1. 3.x modules/aggregator/views_handler_argument_aggregator_fid.inc
  2. 2.x modules/aggregator/views_handler_argument_aggregator_fid.inc

Definition of views_handler_argument_aggregator_fid.

File

modules/aggregator/views_handler_argument_aggregator_fid.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_handler_argument_aggregator_fid.
  5. */
  6. /**
  7. * Argument handler to accept an aggregator feed id.
  8. *
  9. * @ingroup views_argument_handlers
  10. */
  11. class views_handler_argument_aggregator_fid extends views_handler_argument_numeric {
  12. /**
  13. * Override the behavior of title(). Get the title of the feed.
  14. */
  15. function title_query() {
  16. $titles = array();
  17. $result = db_query("SELECT f.title FROM {aggregator_feed} f WHERE f.fid IN (:fids)", array(':fids' => $this->value));
  18. foreach ($result as $term) {
  19. $titles[] = check_plain($term->title);
  20. }
  21. return $titles;
  22. }
  23. }