hosting_task_handler_filter_type.inc

Views handler for the Hosting task module.

Classes

Namesort descending Description
hosting_task_handler_filter_type Filter by task type

File

task/includes/views/handlers/hosting_task_handler_filter_type.inc
View source
  1. <?php
  2. /**
  3. * @file Views handler for the Hosting task module.
  4. */
  5. /**
  6. * Filter by task type
  7. */
  8. class hosting_task_handler_filter_type extends views_handler_filter_in_operator {
  9. function get_value_options() {
  10. if (!isset($this->value_options)) {
  11. $this->value_title = t('Task Type');
  12. $options = array();
  13. foreach (array('site', 'platform') as $type) {
  14. $tasks = hosting_available_tasks($type);
  15. if (!empty($tasks)) {
  16. foreach ($tasks as $identifier => $task) {
  17. $options[$identifier] = $task['title'];
  18. }
  19. }
  20. }
  21. $this->value_options = $options;
  22. }
  23. }
  24. }