private function replaceConstants(Gpf_Data_Record $row) { $coupon = new Pap_Db_Coupon(); $coupon->setId($row->get('id')); $coupon->setCode($row->get('code')); $coupon->setStatus($row->get('status')); $coupon->set(Pap_Db_Table_Coupons::MAX_USE_COUNT, $row->get('limit_use')); $coupon->set(Pap_Db_Table_Coupons::VALID_FROM, $row->get('valid_from')); $coupon->set(Pap_Db_Table_Coupons::VALID_TO, $row->get('valid_to')); $row->add('coupon', $this->banner->getCouponText($coupon)); $row->add('validity', $coupon->isValid()); }