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
Block
Share
Wishlist.php
Go to the documentation of this file.
1
<?php
12
namespace
Magento\Wishlist\Block\Share
;
13
18
class
Wishlist
extends
\Magento\Wishlist\Block\AbstractBlock
19
{
25
protected
$_customer
=
null
;
26
30
protected
$customerRepository
;
31
38
public
function
__construct
(
39
\
Magento
\Catalog\Block\Product\
Context
$context,
40
\
Magento
\Framework\
App
\Http\
Context
$httpContext
,
41
\
Magento
\Customer\Api\CustomerRepositoryInterface
$customerRepository
,
42
array
$data
= []
43
) {
44
$this->customerRepository =
$customerRepository
;
45
parent::__construct(
46
$context,
47
$httpContext
,
48
$data
49
);
50
}
51
58
protected
function
_prepareLayout
()
59
{
60
parent::_prepareLayout();
61
$this->pageConfig->getTitle()->set($this->
getHeader
());
62
return
$this;
63
}
64
70
public
function
getWishlistCustomer
()
71
{
72
if
($this->_customer ===
null
) {
73
$this->_customer = $this->customerRepository->getById($this->
_getWishlist
()->getCustomerId());
74
}
75
76
return
$this->_customer
;
77
}
78
84
public
function
getHeader
()
85
{
86
return
__
(
"%1's Wish List"
, $this->
escapeHtml
($this->
getWishlistCustomer
()->getFirstname()));
87
}
88
}
Magento\Wishlist\Block\Share\Wishlist\getHeader
getHeader()
Definition:
Wishlist.php:84
Magento\Framework\App
Magento\Wishlist\Block\Share\Wishlist\$_customer
$_customer
Definition:
Wishlist.php:25
Magento\Wishlist\Block\Share\Wishlist
Definition:
Wishlist.php:18
__
__()
Definition:
__.php:13
Magento\Wishlist\Block\AbstractBlock\_getWishlist
_getWishlist()
Definition:
AbstractBlock.php:86
Magento\Wishlist\Block\Share\Wishlist\$customerRepository
$customerRepository
Definition:
Wishlist.php:30
Magento\Wishlist\Block\Share\Wishlist\_prepareLayout
_prepareLayout()
Definition:
Wishlist.php:58
Magento\Framework\View\Element\AbstractBlock\escapeHtml
escapeHtml($data, $allowedTags=null)
Definition:
AbstractBlock.php:890
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Wishlist\Block\Share\Wishlist\getWishlistCustomer
getWishlistCustomer()
Definition:
Wishlist.php:70
Magento\Wishlist\Block\AbstractBlock
Definition:
AbstractBlock.php:17
Magento
Magento\Wishlist\Block\Share
Definition:
WishlistTest.php:7
Context
Definition:
ClassesForConstructorIntegrity.php:33
Magento\Wishlist\Block\AbstractBlock\$httpContext
$httpContext
Definition:
AbstractBlock.php:36
Magento\Wishlist\Block\Share\Wishlist\__construct
__construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, array $data=[])
Definition:
Wishlist.php:38