本文整理匯總了PHP中Magento\Framework\App\Action\Context::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Context::__construct方法的具體用法?PHP Context::__construct怎麽用?PHP Context::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\App\Action\Context
的用法示例。
在下文中一共展示了Context::__construct方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\App\ResponseInterface $response
* @param \Magento\Framework\ObjectManagerInterface $objectManager
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\UrlInterface $url
* @param \Magento\Framework\App\Response\RedirectInterface $redirect
* @param \Magento\Framework\App\ActionFlag $actionFlag
* @param \Magento\Framework\App\ViewInterface $view
* @param \Magento\Framework\Message\ManagerInterface $messageManager
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
* @param \Magento\Framework\Controller\ResultFactory $resultFactory
* @param \Magento\Backend\Model\Session $session
* @param \Magento\Framework\AuthorizationInterface $authorization
* @param \Magento\Backend\Model\Auth $auth
* @param \Magento\Backend\Helper\Data $helper
* @param \Magento\Backend\Model\UrlInterface $backendUrl
* @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
* @param bool $canUseBaseUrl
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\ResponseInterface $response, \Magento\Framework\ObjectManagerInterface $objectManager, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\UrlInterface $url, \Magento\Framework\App\Response\RedirectInterface $redirect, \Magento\Framework\App\ActionFlag $actionFlag, \Magento\Framework\App\ViewInterface $view, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory, ResultFactory $resultFactory, \Magento\Backend\Model\Session $session, \Magento\Framework\AuthorizationInterface $authorization, \Magento\Backend\Model\Auth $auth, \Magento\Backend\Helper\Data $helper, \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, \Magento\Framework\Locale\ResolverInterface $localeResolver, $canUseBaseUrl = false)
{
parent::__construct($request, $response, $objectManager, $eventManager, $url, $redirect, $actionFlag, $view, $messageManager, $resultRedirectFactory, $resultFactory);
$this->_session = $session;
$this->_authorization = $authorization;
$this->_auth = $auth;
$this->_helper = $helper;
$this->_backendUrl = $backendUrl;
$this->_formKeyValidator = $formKeyValidator;
$this->_localeResolver = $localeResolver;
$this->_canUseBaseUrl = $canUseBaseUrl;
}