customerSession = $customerSession; } /** * Dispatch request * * @param RequestInterface $request * @return ResponseInterface * @throws NotFoundException */ public function dispatch(RequestInterface $request) { if (!$this->customerSession->authenticate()) { $this->_actionFlag->set('', 'no-dispatch', true); } return parent::dispatch($request); } }