CustomerLogin.php 804 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Wishlist\Observer;
  7. use Magento\Framework\Event\Observer;
  8. use Magento\Framework\Event\ObserverInterface;
  9. use Magento\Wishlist\Helper\Data;
  10. /**
  11. * Class CustomerLogin
  12. * @package Magento\Wishlist\Observer
  13. */
  14. class CustomerLogin implements ObserverInterface
  15. {
  16. /**
  17. * @var \Magento\Wishlist\Helper\Data
  18. */
  19. protected $wishlistData;
  20. /**
  21. * @param Data $wishlistData
  22. */
  23. public function __construct(Data $wishlistData)
  24. {
  25. $this->wishlistData = $wishlistData;
  26. }
  27. /**
  28. * @param Observer $observer
  29. * @return void
  30. */
  31. public function execute(Observer $observer)
  32. {
  33. $this->wishlistData->calculate();
  34. }
  35. }