Advertisement
Guest User

Untitled

a guest
Jul 14th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement