• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Action\Action类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Magento\Framework\App\Action\Action的典型用法代码示例。如果您正苦于以下问题:PHP Action类的具体用法?PHP Action怎么用?PHP Action使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Action类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __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


示例2: __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


示例3: __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


示例4:

 /**
  * @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);
 }
开发者ID:osmansorkar,项目名称:magento2-blog-module,代码行数:12,代码来源:Index.php


示例5: __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


示例6: __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


示例7: __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


示例8: __construct

 /**
  * 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);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:15,代码来源:Index.php


示例9: __construct

 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);
 }
开发者ID:nawajsj,项目名称:Ameex_CancelOrder,代码行数:7,代码来源:Index.php


示例10: __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


示例11: __construct

 /**
  * @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);
 }
开发者ID:opexsw,项目名称:magento2,代码行数:13,代码来源:Update.php


示例12: __construct

 /**
  * 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);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:15,代码来源:Getbasket.php


示例13: __construct

 /**
  * 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);
 }
开发者ID:paynl,项目名称:magento2-plugin,代码行数:14,代码来源:Finish.php


示例14: __construct

 /**
  * 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);
 }
开发者ID:ThomasNegeli,项目名称:dotmailer-magento2-extension,代码行数:12,代码来源:Index.php


示例15: __construct

 /**
  * @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);
 }
开发者ID:opexsw,项目名称:magento2,代码行数:13,代码来源:Configure.php


示例16: __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


示例17: __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


示例18: dispatch

 /**
  * 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);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:13,代码来源:Customer.php


示例19: __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


示例20: dispatch

 /**
  * 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);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:Index.php



注:本文中的Magento\Framework\App\Action\Action类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Action\Context类代码示例发布时间:2022-05-23
下一篇:
PHP App\ViewInterface类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap