123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Wishlist\Observer;
- use Magento\Framework\Event\Observer;
- use Magento\Framework\Event\ObserverInterface;
- use Magento\Customer\Model\Session;
- /**
- * Class CustomerLogout
- * @package Magento\Wishlist\Observer
- */
- class CustomerLogout implements ObserverInterface
- {
- /**
- * @var \Magento\Customer\Model\Session
- */
- protected $customerSession;
- /**
- * @param Session $customerSession
- */
- public function __construct(Session $customerSession)
- {
- $this->customerSession = $customerSession;
- }
- /**
- * Customer logout processing
- *
- * @param Observer $observer
- * @return void
- */
- public function execute(Observer $observer)
- {
- $this->customerSession->setWishlistItemCount(0);
- }
- }
|