/** * @param Context $context * @param Sidebar $sidebar * @param LoggerInterface $logger * @param Data $jsonHelper */ public function __construct(Context $context, Sidebar $sidebar, LoggerInterface $logger, Data $jsonHelper) { $this->sidebar = $sidebar; $this->logger = $logger; $this->jsonHelper = $jsonHelper; parent::__construct($context); }
/** * Constructor. * * @param \Magento\Framework\App\Action\Context $context Controller action context. * @param \Magento\Framework\Controller\Result\JsonFactory $jsonResultFactory JSON result factory. * @param \Magento\Catalog\Model\Layer\Resolver $layerResolver Layer resolver. * @param \Magento\Catalog\Model\Layer\FilterList[] $filterListPool Filter list pool. */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\Controller\Result\JsonFactory $jsonResultFactory, \Magento\Catalog\Model\Layer\Resolver $layerResolver, $filterListPool = []) { parent::__construct($context); $this->jsonResultFactory = $jsonResultFactory; $this->layerResolver = $layerResolver; $this->filterListPool = $filterListPool; }
/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Rss\Helper\WishlistRss $wishlistHelper * @param \Magento\Customer\Model\Session $customerSession */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Rss\Helper\WishlistRss $wishlistHelper, \Magento\Customer\Model\Session $customerSession) { $this->_scopeConfig = $scopeConfig; $this->_wishlistHelper = $wishlistHelper; $this->_customerSession = $customerSession; parent::__construct($context); }
/** * Check customer authentication for some actions * * @param \Magento\Framework\App\RequestInterface $request * @return \Magento\Framework\App\ResponseInterface */ public function dispatch(RequestInterface $request) { if (!$this->customerSession->authenticate()) { $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); } return parent::dispatch($request); }
/** * @param Context $context * @param LoggerInterface $logger * @param SessionManagerInterface $session * @param GetPaymentNonceCommand $command */ public function __construct(Context $context, LoggerInterface $logger, SessionManagerInterface $session, GetPaymentNonceCommand $command) { parent::__construct($context); $this->logger = $logger; $this->session = $session; $this->command = $command; }
/** * Dispatch request * * @param RequestInterface $request * @return \Magento\Framework\App\ResponseInterface * @throws \Magento\Framework\Exception\NotFoundException */ public function dispatch(RequestInterface $request) { if (!$this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED, ScopeInterface::SCOPE_STORE)) { throw new NotFoundException(__('Page not found.')); } return parent::dispatch($request); }
/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService * @codeCoverageIgnore */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, \Magento\Sales\Api\OrderCustomerManagementInterface $orderCustomerService) { $this->checkoutSession = $checkoutSession; $this->customerSession = $customerSession; $this->orderCustomerService = $orderCustomerService; parent::__construct($context); }
/** * @param Context $context * @param PageFactory $resultPageFactory */ public function __construct( Context $context, PageFactory $resultPageFactory ) { $this->resultPageFactory = $resultPageFactory; parent::__construct($context); }
/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param \OsmanSorkar\Blog\Model\postFactory */ function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \OsmanSorkar\Blog\Model\Post $post, \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory) { $this->resultPageFactory = $resultPageFactory; $this->post = $post; $this->resultForwardFactory = $resultForwardFactory; parent::__construct($context); }
public function __construct(\Magento\Framework\App\Action\Context $context, \MageClass\First\Model\Test $test, \Magento\Catalog\Model\ProductFactory $productFactory) { $this->_test = $test; # Reference this product factory object $this->_productFactory = $productFactory; parent::__construct($context); }
/** * @param Context $context * @param Session $customerSession * @param PageFactory $resultPageFactory * @param AccountManagementInterface $accountManagement */ public function __construct(Context $context, Session $customerSession, PageFactory $resultPageFactory, AccountManagementInterface $accountManagement) { $this->session = $customerSession; $this->resultPageFactory = $resultPageFactory; $this->accountManagement = $accountManagement; parent::__construct($context); }
/** * @param Action\Context $context * @param OrderLoaderInterface $orderLoader * @param Registry $registry * @param RedirectFactory $resultRedirectFactory */ public function __construct(Action\Context $context, OrderLoaderInterface $orderLoader, Registry $registry, RedirectFactory $resultRedirectFactory) { $this->orderLoader = $orderLoader; $this->_coreRegistry = $registry; $this->resultRedirectFactory = $resultRedirectFactory; parent::__construct($context); }
/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Shipping\Model\InfoFactory $shippingInfoFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Shipping\Model\InfoFactory $shippingInfoFactory, \Magento\Sales\Model\OrderFactory $orderFactory) { $this->_coreRegistry = $coreRegistry; $this->_shippingInfoFactory = $shippingInfoFactory; $this->_orderFactory = $orderFactory; parent::__construct($context); }
public function __construct(Context $context, PageFactory $resultPageFactory, LoggerInterface $loggerInterface, Registry $registry) { $this->_resultPageFactory = $resultPageFactory; $this->_logger = $loggerInterface; $this->_coreRegistry = $registry; parent::__construct($context); }
/** * Construct * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Persistent\Model\Observer $persistentObserver * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Persistent\Model\Observer $persistentObserver, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession) { $this->_persistentObserver = $persistentObserver; $this->_checkoutSession = $checkoutSession; $this->_customerSession = $customerSession; parent::__construct($context); }
public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \Magento\Framework\App\Request\Http $request, \Magento\Sales\Api\OrderManagementInterface $orderManagement) { $this->request = $request; $this->orderManagement = $orderManagement; $this->resultPageFactory = $resultPageFactory; parent::__construct($context); }
/** * @param Context $context * @param WishlistProvider $wishlistProvider * @param \Magento\Framework\Registry $registry * @param \Magento\Customer\Model\Session $customerSession */ public function __construct(Context $context, WishlistProvider $wishlistProvider, \Magento\Framework\Registry $registry, \Magento\Customer\Model\Session $customerSession) { $this->wishlistProvider = $wishlistProvider; $this->registry = $registry; $this->customerSession = $customerSession; parent::__construct($context); }
/** * @param AuthorFactory $authorFactory * @param Registry $registry * @param Context $context */ public function __construct(AuthorFactory $authorFactory, Registry $registry, Context $context) { $this->authorFactory = $authorFactory; $this->registry = $registry; $this->resultFactory = $context->getResultFactory(); parent::__construct($context); }
/** * Dispatch request * * @param RequestInterface $request * @return ResponseInterface * @throws NotFoundException */ public function dispatch(RequestInterface $request) { if (!$this->customerSession->authenticate()) { $this->_actionFlag->set('', 'no-dispatch', true); } return parent::dispatch($request); }
/** * @param Context $context * @param Session $customerSession * @param PageFactory $resultPageFactory * @param Registration $registration */ public function __construct(Context $context, Session $customerSession, PageFactory $resultPageFactory, Registration $registration) { $this->session = $customerSession; $this->resultPageFactory = $resultPageFactory; $this->registration = $registration; parent::__construct($context); }
/** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\DB\TransactionFactory $transactionFactory * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory * @param OrderSender $orderSender */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\DB\TransactionFactory $transactionFactory, \Magento\Sales\Model\OrderFactory $salesOrderFactory, OrderSender $orderSender) { parent::__construct($context); $this->_transactionFactory = $transactionFactory; $this->_salesOrderFactory = $salesOrderFactory; $this->orderSender = $orderSender; }
/** * @param Action\Context $context * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator * @param \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider * @param \Magento\Wishlist\Model\LocaleQuantityProcessor $quantityProcessor */ public function __construct(Action\Context $context, \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider, \Magento\Wishlist\Model\LocaleQuantityProcessor $quantityProcessor) { $this->_formKeyValidator = $formKeyValidator; $this->wishlistProvider = $wishlistProvider; $this->quantityProcessor = $quantityProcessor; parent::__construct($context); }
/** * Getbasket constructor. * * @param \Magento\Checkout\Model\SessionFactory $checkoutSessionFactory * @param \Magento\Quote\Model\QuoteFactory $quoteFactory * @param \Magento\Customer\Model\SessionFactory $sessionFactory * @param \Magento\Framework\App\Action\Context $context */ public function __construct(\Magento\Checkout\Model\SessionFactory $checkoutSessionFactory, \Magento\Quote\Model\QuoteFactory $quoteFactory, \Magento\Customer\Model\SessionFactory $sessionFactory, \Magento\Framework\App\Action\Context $context) { $this->checkoutSession = $checkoutSessionFactory; $this->sessionFactory = $sessionFactory; $this->quoteFactory = $quoteFactory; parent::__construct($context); }
/** * Index constructor. * @param \Magento\Framework\App\Action\Context $context * @param \Paynl\Payment\Model\Config $config * @param Session $checkoutSession * @param \Psr\Log\LoggerInterface $logger */ public function __construct(\Magento\Framework\App\Action\Context $context, \Paynl\Payment\Model\Config $config, Session $checkoutSession, \Psr\Log\LoggerInterface $logger) { $this->_config = $config; $this->_checkoutSession = $checkoutSession; $this->_logger = $logger; parent::__construct($context); }
/** * Pass arguments for dependency injection * * @param \Magento\Framework\App\Action\Context $context */ public function __construct(Context $context, PageFactory $pageFactory, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate) { $this->_scopeConfig = $scopeConfigInterface; $this->_localeDate = $localeDate; $this->pageFactory = $pageFactory; return parent::__construct($context); }
/** * {@inheritdoc} */ public function dispatch(\Magento\Framework\App\RequestInterface $request) { if (!$this->_getCheckout()->getCustomer()->getId()) { return $this->_redirect('customer/account/login'); } return parent::dispatch($request); }
/** * @param Context $context * @param OrderViewAuthorizationInterface $orderAuthorization * @param \Magento\Framework\Registry $registry * @param PageFactory $resultPageFactory */ public function __construct(Context $context, OrderViewAuthorizationInterface $orderAuthorization, \Magento\Framework\Registry $registry, PageFactory $resultPageFactory) { $this->orderAuthorization = $orderAuthorization; $this->_coreRegistry = $registry; $this->resultPageFactory = $resultPageFactory; parent::__construct($context); }
public function __construct(Context $context, OrderFactory $orderFactory, Session $checkoutSession, KhipuPayment $khipuPayment) { parent::__construct($context); $this->orderFactory = $orderFactory; $this->khipuPayment = $khipuPayment; $this->checkoutSession = $checkoutSession; }
/** * @param Action\Context $context * @param \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory */ public function __construct(Action\Context $context, \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\View\Result\PageFactory $resultPageFactory) { $this->wishlistProvider = $wishlistProvider; $this->_coreRegistry = $coreRegistry; $this->resultPageFactory = $resultPageFactory; parent::__construct($context); }
/** * Coupon constructor. * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository * @param \Magento\Framework\Registry $registry */ public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Quote\Api\CartRepositoryInterface $quoteRepository, \Magento\Framework\Registry $registry) { parent::__construct($context); $this->_checkoutSession = $checkoutSession; $this->quoteRepository = $quoteRepository; $this->_registry = $registry; }