コード例 #1
0
 /**
  * Check if current section is found and is allowed
  *
  * @param \Magento\Framework\App\RequestInterface $request
  * @return \Magento\Framework\App\ResponseInterface
  */
 public function dispatch(\Magento\Framework\App\RequestInterface $request)
 {
     if (!$request->getParam('section')) {
         $request->setParam('section', $this->_configStructure->getFirstSection()->getId());
     }
     return parent::dispatch($request);
 }
コード例 #2
0
 /**
  * Check if current section is found and is allowed
  *
  * @param \Magento\Framework\App\RequestInterface $request
  * @return \Magento\Framework\App\ResponseInterface
  */
 public function dispatch(\Magento\Framework\App\RequestInterface $request)
 {
     $section = null;
     if (!$request->getParam('section')) {
         $section = $this->_configStructure->getFirstSection();
         $request->setParam('section', $section->getId());
     } else {
         $this->_isSectionAllowed($request->getParam('section'));
     }
     return parent::dispatch($request);
 }