Advertisement
Guest User

Untitled

a guest
Jul 14th, 2020
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None
  1. protected function createComponentCouponForm(\App\Forms\ICouponFormFactory $factory)
  2.     {
  3.         $control = $factory->create($this->coupon);
  4.         $control['coupon']->onSuccess[] = [$this, 'couponFormSucceeded'];
  5.  
  6.         return $control;
  7.     }
  8.  
  9.     /**
  10.      * @param UI\Form $form
  11.      * @return void
  12.      */
  13.     public function couponFormSucceeded(UI\Form $form, $values)
  14.     {
  15.         $this->closeDialog('coupon');
  16.         $this->redirect('coupons', ['id' => NULL]);
  17.     }
Advertisement
RAW Paste Data Copied
Advertisement