Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
UnsetAllObserver Class Reference
Inheritance diagram for UnsetAllObserver:
ObserverInterface

Public Member Functions

 __construct (\Magento\Checkout\Model\Session $checkoutSession)
 
 execute (\Magento\Framework\Event\Observer $observer)
 
- Public Member Functions inherited from ObserverInterface
 execute (Observer $observer)
 

Protected Attributes

 $checkoutSession
 

Detailed Description

Definition at line 10 of file UnsetAllObserver.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Checkout\Model\Session  $checkoutSession)
Parameters
\Magento\Checkout\Model\Session$checkoutSession@codeCoverageIgnore

Definition at line 21 of file UnsetAllObserver.php.

22  {
23  $this->checkoutSession = $checkoutSession;
24  }

Member Function Documentation

◆ execute()

execute ( \Magento\Framework\Event\Observer  $observer)
Parameters
\Magento\Framework\Event\Observer$observer
Returns
void @codeCoverageIgnore

Definition at line 31 of file UnsetAllObserver.php.

32  {
33  $this->checkoutSession->clearQuote()->clearStorage();
34  }

Field Documentation

◆ $checkoutSession

$checkoutSession
protected

Definition at line 15 of file UnsetAllObserver.php.


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