uc_coupon_handler_field_value.inc in Ubercart Discount Coupons 7.3
Same filename and directory in other branches
Views handler: Coupon value field.
File
views/uc_coupon_handler_field_value.incView source
<?php
/**
* @file
* Views handler: Coupon value field.
*/
/**
* Return a coupon value as price or percentage.
*/
class uc_coupon_handler_field_value extends views_handler_field_numeric {
function render($values) {
$coupon = new stdClass();
$coupon->value = $values->{$this->field_alias};
$coupon->type = $values->{$this->aliases['type']};
return theme('uc_coupon_discount', array(
'coupon' => $coupon,
));
}
}
Classes
Name | Description |
---|---|
uc_coupon_handler_field_value | Return a coupon value as price or percentage. |