views_handler_filter_aggregator_category_cid.inc 624 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_handler_filter_aggregator_category_cid.
  5. */
  6. /**
  7. * Filter by aggregator category cid
  8. *
  9. * @ingroup views_filter_handlers
  10. */
  11. class views_handler_filter_aggregator_category_cid extends views_handler_filter_in_operator {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public function get_value_options() {
  16. if (isset($this->value_options)) {
  17. return;
  18. }
  19. $this->value_options = array();
  20. $result = db_query('SELECT * FROM {aggregator_category} ORDER BY title');
  21. foreach ($result as $category) {
  22. $this->value_options[$category->cid] = $category->title;
  23. }
  24. }
  25. }