Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
7 
11 
13 {
17  protected $wishlistProvider;
18 
23  public function __construct(
24  Action\Context $context,
26  ) {
27  $this->wishlistProvider = $wishlistProvider;
28  parent::__construct($context);
29  }
30 
37  public function execute()
38  {
39  if (!$this->wishlistProvider->getWishlist()) {
40  throw new NotFoundException(__('Page not found.'));
41  }
43  $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
44  return $resultPage;
45  }
46 }
__construct(Action\Context $context, \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider)
Definition: Index.php:23
__()
Definition: __.php:13