Guest User

Untitled

a guest
Dec 9th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment