commerce_coupon_usage_views_handler_area_usage_summary.inc in Commerce Coupon 7.2
File
modules/usage/includes/views/handlers/commerce_coupon_usage_views_handler_area_usage_summary.inc
View source
<?php
class commerce_coupon_usage_views_handler_area_usage_summary extends views_handler_area {
function render($empty = FALSE) {
if (!$empty || !empty($this->options['empty'])) {
foreach ($this->view->argument as $name => $argument) {
if ($argument instanceof commerce_coupon_handler_argument_coupon_id) {
if (count($argument->value) == 1) {
$coupon_id = reset($argument->value);
if (is_numeric($coupon_id) && $coupon_id) {
$variables = array(
'coupon_id' => $coupon_id,
'details_link_text' => FALSE,
);
return theme('commerce_coupon_usage_summary', $variables);
}
}
}
}
}
}
}