daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Dec 9th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1 exception(s):
  2. Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: CustomPaymentControllerIndexIndexInterceptor
  3.  
  4. Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: CustomPaymentControllerIndexIndexInterceptor
  5. #0
  6.    
  7. namespace CustomPaymentHelper;
  8.  
  9. use MagentoFrameworkAppHelperAbstractHelper;
  10.  
  11. class General extends AbstractHelper
  12. {
  13.  
  14.     public function RandomFunc()
  15.        {
  16.                echo "This is Helper in Magento 2";
  17.        }
  18.  
  19. }
  20.    
  21. namespace CustomPaymentControllerIndex;
  22.  
  23. use CustomPaymentHelperGeneral as CustomHelper;
  24. use MagentoFrameworkAppActionAction;
  25.  
  26. class Index extends Action
  27. {
  28.     protected $helper;
  29.  
  30.     public function __construct(
  31.         CustomHelper $helper
  32.     ) {
  33.         $this->helper = $helper;
  34.     }
  35.  
  36.     public function execute()
  37.     {
  38.         $this->helper->RandomFunc();
  39.     }
  40. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top