uc_order_handler_field_money_amount.inc 523 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @file
  4. * Views handler: Product price field.
  5. */
  6. /**
  7. * Returns a formatted price value to display in the View.
  8. */
  9. class uc_order_handler_field_money_amount extends uc_product_handler_field_price {
  10. /**
  11. * Overrides views_handler_field::render().
  12. */
  13. function render($values) {
  14. if ($this->options['format'] == 'numeric') {
  15. return parent::render($values);
  16. }
  17. if ($this->options['format'] == 'uc_price') {
  18. return uc_currency_format($values->{$this->field_alias});
  19. }
  20. }
  21. }