本文整理匯總了PHP中Magento\Framework\App\Action\Context::getEventManager方法的典型用法代碼示例。如果您正苦於以下問題:PHP Context::getEventManager方法的具體用法?PHP Context::getEventManager怎麽用?PHP Context::getEventManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\App\Action\Context
的用法示例。
在下文中一共展示了Context::getEventManager方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param Context $context
* @param Registry $coreRegistry
* @param DataFactory $dataFactory
* @param CartManagementInterface $cartManagement
* @param Onepage $onepageCheckout
* @param JsonHelper $jsonHelper
*/
public function __construct(Context $context, Registry $coreRegistry, DataFactory $dataFactory, CartManagementInterface $cartManagement, Onepage $onepageCheckout, JsonHelper $jsonHelper)
{
$this->eventManager = $context->getEventManager();
$this->cartManagement = $cartManagement;
$this->onepageCheckout = $onepageCheckout;
$this->jsonHelper = $jsonHelper;
parent::__construct($context, $coreRegistry, $dataFactory);
}
示例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();
}