當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Action::__construct方法代碼示例

本文整理匯總了PHP中Magento\Framework\App\Action\Action::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Action::__construct方法的具體用法?PHP Action::__construct怎麽用?PHP Action::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\App\Action\Action的用法示例。


在下文中一共展示了Action::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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;
 }
開發者ID:SummaSolutions,項目名稱:cart-magento2,代碼行數:15,代碼來源:Subtotals.php

示例2: __construct

 /**
  * 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;
 }
開發者ID:smile-sa,項目名稱:elasticsuite,代碼行數:15,代碼來源:Ajax.php

示例3: __construct

 /**
  * @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);
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:13,代碼來源:Index.php

示例4: __construct

 /**
  * @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;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:13,代碼來源:Api.php

示例5: __construct

 /**
  * @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;
 }
開發者ID:BlackIkeEagle,項目名稱:magento2-continuousphp,代碼行數:13,代碼來源:GetNonce.php

示例6: __construct

 /**
  * @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);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:13,代碼來源:Index.php

示例7: __construct

 /**
  * @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);
 }
開發者ID:nblair,項目名稱:magescotch,代碼行數:14,代碼來源:Create.php

示例8: __construct

 /**
  * @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);
 }
開發者ID:nblair,項目名稱:magescotch,代碼行數:13,代碼來源:CreatePassword.php

示例9: __construct

 /**
  * @param Context $context
  * @param PageFactory $resultPageFactory
  */
 public function __construct(
     Context $context,
     PageFactory $resultPageFactory
 ) {
     $this->resultPageFactory = $resultPageFactory;
     parent::__construct($context);
 }
開發者ID:nblair,項目名稱:magescotch,代碼行數:11,代碼來源:History.php

示例10: __construct

 /**
  * @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);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:13,代碼來源:Reorder.php

示例11: __construct

 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);
 }
開發者ID:joelholtzman77,項目名稱:bigfatbowl,代碼行數:7,代碼來源:Index.php

示例12: __construct

 /**
  * @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);
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:13,代碼來源:Popup.php

示例13: __construct

 public function __construct(Context $context, PageFactory $resultPageFactory, LoggerInterface $loggerInterface, Registry $registry)
 {
     $this->_resultPageFactory = $resultPageFactory;
     $this->_logger = $loggerInterface;
     $this->_coreRegistry = $registry;
     parent::__construct($context);
 }
開發者ID:dragonsword007008,項目名稱:magento2,代碼行數:7,代碼來源:Review.php

示例14: __construct

 /**
  * @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);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:13,代碼來源:UpdateItemQty.php

示例15: __construct

 public function __construct(Context $context, OrderFactory $orderFactory, Session $checkoutSession, KhipuPayment $khipuPayment)
 {
     parent::__construct($context);
     $this->orderFactory = $orderFactory;
     $this->khipuPayment = $khipuPayment;
     $this->checkoutSession = $checkoutSession;
 }
開發者ID:khipu,項目名稱:magento2-khipu,代碼行數:7,代碼來源:PlaceOrder.php


注:本文中的Magento\Framework\App\Action\Action::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。