actionFactory = $actionFactory; $this->noRouteHandlerList = $noRouteHandlerList; } /** * Modify request and set to no-route action * * @param RequestInterface $request * @return ActionInterface */ public function match(RequestInterface $request) { foreach ($this->noRouteHandlerList->getHandlers() as $noRouteHandler) { if ($noRouteHandler->process($request)) { break; } } return $this->actionFactory->create(\Magento\Framework\App\Action\Forward::class); } }