當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。