uc_coupon_purchase_handler_field_base_name.inc in Ubercart Discount Coupons 7.2
Same filename and directory in other branches
Views handler: Coupon base name
File
uc_coupon_purchase/views/uc_coupon_purchase_handler_field_base_name.incView source
<?php
/**
* @file
* Views handler: Coupon base name
*/
/**
* Return base name of purchased coupon (strip off "purchased by...")
*/
class uc_coupon_purchase_handler_field_base_name extends views_handler_field {
function render($values) {
$s = $values->{$this->field_alias};
$n = stripos($s, "purchased by");
if ($n) {
$s = substr($s, 0, $n - 1);
}
return $s;
}
}
Classes
Name | Description |
---|---|
uc_coupon_purchase_handler_field_base_name | Return base name of purchased coupon (strip off "purchased by...") |