uc_order_handler_filter_payment_method.inc 638 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @file
  4. * Views handler: Returns payment method name for payment method id.
  5. */
  6. /**
  7. * Filters by payment method.
  8. */
  9. class uc_order_handler_filter_payment_method extends views_handler_filter_in_operator {
  10. /**
  11. * Overrides views_handler_filter_in_operator::get_value_options().
  12. */
  13. function get_value_options() {
  14. if (!isset($this->value_options)) {
  15. $this->value_options = array();
  16. if (module_exists('uc_payment')) {
  17. $methods = _uc_payment_method_list();
  18. foreach ($methods as $method) {
  19. $this->value_options[$method['id']] = $method['name'];
  20. }
  21. }
  22. }
  23. }
  24. }