当前位置: 首页>>代码示例>>PHP>>正文


PHP Context::getMessageManager方法代码示例

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


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

示例1: __construct

 /**
  * @param \Magento\Framework\App\Action\Context $context
  * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
  * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  */
 public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Escaper $escaper)
 {
     $this->_transportBuilder = $transportBuilder;
     $this->inlineTranslation = $inlineTranslation;
     $this->scopeConfig = $scopeConfig;
     $this->storeManager = $storeManager;
     $this->_escaper = $escaper;
     $this->messageManager = $context->getMessageManager();
 }
开发者ID:alinmiron,项目名称:alin-cadou,代码行数:16,代码来源:Mailer.php

示例2: __construct

 /**
  * @param Context $context
  */
 public function __construct(Context $context)
 {
     parent::__construct($context->getRequest(), $context->getResponse());
     $this->_objectManager = $context->getObjectManager();
     $this->_eventManager = $context->getEventManager();
     $this->_url = $context->getUrl();
     $this->_actionFlag = $context->getActionFlag();
     $this->_redirect = $context->getRedirect();
     $this->_view = $context->getView();
     $this->messageManager = $context->getMessageManager();
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:14,代码来源:Action.php

示例3: __construct

 public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Checkout\Model\CartFactory $cartModel, \Magento\Framework\ObjectManagerInterface $objectInterface, \Magento\Checkout\Model\Session $checkoutSession, \Rejoiner\Acr\Helper\Data $rejoinerHelper, \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory $stockItem, \Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory $stockItemFactory, \Magento\Store\Model\StoreManagerInterface $storeManagerInterface, \Magento\Catalog\Model\ProductFactory $product)
 {
     $this->_checkoutSession = $checkoutSession;
     $this->_objectInterface = $objectInterface;
     $this->_rejoinerHelper = $rejoinerHelper;
     $this->_stockItemFactory = $stockItemFactory;
     $this->_cartModel = $cartModel;
     $this->_stockItem = $stockItem;
     $this->_storeManagerInterface = $storeManagerInterface;
     $this->_product = $product;
     $this->_messageManager = $context->getMessageManager();
     parent::__construct($context);
 }
开发者ID:pavlots,项目名称:rejoiner,代码行数:13,代码来源:Index.php


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