wishlistProvider = $wishlistProvider; parent::__construct($context); } /** * Display customer wishlist * * @return \Magento\Framework\View\Result\Page * @throws NotFoundException */ public function execute() { if (!$this->wishlistProvider->getWishlist()) { throw new NotFoundException(__('Page not found.')); } /** @var \Magento\Framework\View\Result\Page resultPage */ $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE); return $resultPage; } }