本文整理匯總了PHP中Magento\Framework\View\Element\Template\Context::getAppState方法的典型用法代碼示例。如果您正苦於以下問題:PHP Context::getAppState方法的具體用法?PHP Context::getAppState怎麽用?PHP Context::getAppState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\View\Element\Template\Context
的用法示例。
在下文中一共展示了Context::getAppState方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Riskified\Decider\Api\Config $apiConfig, \Magento\Framework\Session\SessionManagerInterface $session, array $data = [])
{
$this->validator = $context->getValidator();
$this->resolver = $context->getResolver();
$this->_filesystem = $context->getFilesystem();
$this->templateEnginePool = $context->getEnginePool();
$this->_storeManager = $context->getStoreManager();
$this->_appState = $context->getAppState();
$this->templateContext = $this;
$this->pageConfig = $context->getPageConfig();
$this->apiConfig = $apiConfig;
$this->session = $session;
parent::__construct($context, $data);
}
示例2: __construct
/**
* Constructor
*
* @param Template\Context $context
* @param array $data
*/
public function __construct(Template\Context $context, array $data = [])
{
$this->_filesystem = $context->getFilesystem();
$this->_viewFileSystem = $context->getViewFileSystem();
$this->templateEnginePool = $context->getEnginePool();
$this->_storeManager = $context->getStoreManager();
$this->_appState = $context->getAppState();
$this->templateContext = $this;
$this->pageConfig = $context->getPageConfig();
parent::__construct($context, $data);
}