flag_lists_handler_argument_fid.inc 583 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @file
  4. * Provide list fid argument handler.
  5. */
  6. /**
  7. * Argument handler to accept a list id.
  8. */
  9. class flag_lists_handler_argument_fid extends views_handler_argument_numeric {
  10. /**
  11. * Override the behavior of title(). Get the title of the list.
  12. */
  13. function title_query() {
  14. $titles = array();
  15. $result = db_select('flag_lists_flags', 'fl')
  16. ->fields('fl', array('title'))
  17. ->condition('fl.fid', $this->value, 'IN')
  18. ->execute();
  19. foreach ($result as $term) {
  20. $titles[] = check_plain($term->title);
  21. }
  22. return $titles;
  23. }
  24. }