Gpf_Rpc_Form::fill PHP Method

fill() public method

public fill ( Gpf_Data_Row $row )
$row Gpf_Data_Row
        public function fill(Gpf_Data_Row $row)
        {
            foreach ($this->fields as $field) {
                try {
                    $row->set($field->get(self::FIELD_NAME), $field->get(self::FIELD_VALUE));
                } catch (Exception $e) {
                }
            }
        }

Usage Example

 protected function generateCoupon($code) {
     $coupon = new Pap_Db_Coupon();
     $this->form->fill($coupon);
     $coupon->setBannerID($this->form->getFieldValue(Pap_Features_Coupon_CreateCoupons::BANNER_ID));
     $coupon->setStatus(Pap_Common_Constants::STATUS_APPROVED);
     $coupon->setCode($code);
     $coupon->setUserID($this->affiliateID);
     $coupon->setUseCount(0);
     $this->insertCoupon($coupon);
 }
All Usage Examples Of Gpf_Rpc_Form::fill