_helper = $helper; $this->_subject = $subject; } /** * Process path info * * @param \Magento\Framework\App\RequestInterface $request * @param string $pathInfo * @return string */ public function process(\Magento\Framework\App\RequestInterface $request, $pathInfo) { $pathParts = explode('/', ltrim($pathInfo, '/'), 2); $firstPart = $pathParts[0]; if ($firstPart != $this->_helper->getAreaFrontName()) { return $this->_subject->process($request, $pathInfo); } return $pathInfo; } }