Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-wishlist
Controller
Index
Index.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Wishlist\Controller\Index
;
7
8
use
Magento\Framework\App\Action
;
9
use
Magento\Framework\Exception\NotFoundException
;
10
use
Magento\Framework\Controller\ResultFactory
;
11
12
class
Index
extends
\Magento\Wishlist\Controller\AbstractIndex
13
{
17
protected
$wishlistProvider
;
18
23
public
function
__construct
(
24
Action
\
Context
$context,
25
\
Magento
\Wishlist\Controller\
WishlistProviderInterface
$wishlistProvider
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
}
Magento\Wishlist\Controller\Index\Index\__construct
__construct(Action\Context $context, \Magento\Wishlist\Controller\WishlistProviderInterface $wishlistProvider)
Definition:
Index.php:23
Magento\Framework\Controller\ResultFactory
Definition:
ResultFactory.php:17
__
__()
Definition:
__.php:13
Magento\Wishlist\Controller\Index\Index\$wishlistProvider
$wishlistProvider
Definition:
Index.php:17
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Wishlist\Controller\WishlistProviderInterface
Definition:
WishlistProviderInterface.php:13
Magento\Framework\Exception\NotFoundException
Definition:
NotFoundException.php:12
Magento
Magento\Wishlist\Controller\Index\Index
Definition:
Index.php:12
Magento\Framework\Controller\ResultFactory\TYPE_PAGE
const TYPE_PAGE
Definition:
ResultFactory.php:27
Magento\Framework\App\Action\Context
Definition:
Context.php:24
Magento\Wishlist\Controller\Index
Definition:
Add.php:6
Magento\Wishlist\Controller\AbstractIndex
Definition:
AbstractIndex.php:15
Magento\Framework\App\Action\Action
Definition:
Action.php:25
Magento\Framework\App\Action
Definition:
AbstractAction.php:8