/** * 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); }
/** * 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); }