BindCustomerLogoutObserver.php 830 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Observer\Compare;
  7. use Magento\Framework\Event\ObserverInterface;
  8. use Magento\Catalog\Model\Product\Compare\Item;
  9. /**
  10. * Catalog Compare Item Model
  11. *
  12. */
  13. class BindCustomerLogoutObserver implements ObserverInterface
  14. {
  15. /**
  16. * @param Item $item
  17. */
  18. public function __construct(
  19. Item $item
  20. ) {
  21. $this->item = $item;
  22. }
  23. /**
  24. * Customer login bind process
  25. * @param \Magento\Framework\Event\Observer $observer
  26. * @return $this
  27. *
  28. * @SuppressWarnings(PHPMD.UnusedLocalVariable)
  29. */
  30. public function execute(\Magento\Framework\Event\Observer $observer)
  31. {
  32. $this->item->bindCustomerLogout();
  33. return $this;
  34. }
  35. }