function uc_coupon_data_property_set in Ubercart Discount Coupons 7.3
Generic setter to update properties from the coupon data array.
1 string reference to 'uc_coupon_data_property_set'
File
- ./
uc_coupon.entity.inc, line 291 - Entity Controller and Metadata Controller classes for uc_coupon.
Code
function uc_coupon_data_property_set($coupon, $name, $value) {
switch ($name) {
case 'base_coupon':
$coupon->data[$name] = $value->cid;
break;
default:
if (is_array($value)) {
$coupon->data[$name] = drupal_map_assoc($value);
}
else {
$coupon->data[$name] = $name;
}
}
}