Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
CustomerData Class Reference

Public Member Functions

 __construct (\Magento\Persistent\Helper\Data $persistentData, \Magento\Customer\Model\Session $customerSession, \Magento\Persistent\Helper\Session $persistentSession)
 
 aroundGetSectionData (\Magento\Customer\CustomerData\Customer $subject, \Closure $proceed)
 

Protected Attributes

 $persistentData
 
 $customerSession
 
 $persistentSession
 

Detailed Description

Definition at line 8 of file CustomerData.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Persistent\Helper\Data  $persistentData,
\Magento\Customer\Model\Session  $customerSession,
\Magento\Persistent\Helper\Session  $persistentSession 
)

CustomerData constructor.

Parameters
\Magento\Persistent\Helper\Data$persistentData
\Magento\Customer\Model\Session$customerSession
\Magento\Persistent\Helper\Session$persistentSession

Definition at line 38 of file CustomerData.php.

42  {
43  $this->persistentData = $persistentData;
44  $this->customerSession = $customerSession;
45  $this->persistentSession = $persistentSession;
46  }

Member Function Documentation

◆ aroundGetSectionData()

aroundGetSectionData ( \Magento\Customer\CustomerData\Customer  $subject,
\Closure  $proceed 
)

Reset quote reward point amount

Parameters
\Magento\Customer\CustomerData\Customer$subject
\Closure$proceed
Returns
array @SuppressWarnings(PHPMD.UnusedFormalParameter)

unset customer first name

Definition at line 57 of file CustomerData.php.

60  {
62  if (!$this->customerSession->isLoggedIn()
63  && $this->persistentData->isEnabled()
64  && $this->persistentSession->isPersistent()
65  ) {
66  return [];
67  }
68  return $proceed();
69  }

Field Documentation

◆ $customerSession

$customerSession
protected

Definition at line 22 of file CustomerData.php.

◆ $persistentData

$persistentData
protected

Definition at line 15 of file CustomerData.php.

◆ $persistentSession

$persistentSession
protected

Definition at line 29 of file CustomerData.php.


The documentation for this class was generated from the following file: