Price.php 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\ProductAlert\Block\Email;
  7. /**
  8. * ProductAlert email price changed grid
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Price extends \Magento\ProductAlert\Block\Email\AbstractEmail
  13. {
  14. /**
  15. * @var string
  16. */
  17. protected $_template = 'Magento_ProductAlert::email/price.phtml';
  18. /**
  19. * Retrieve unsubscribe url for product
  20. *
  21. * @param int $productId
  22. * @return string
  23. */
  24. public function getProductUnsubscribeUrl($productId)
  25. {
  26. $params = $this->_getUrlParams();
  27. $params['product'] = $productId;
  28. return $this->getUrl('productalert/unsubscribe/price', $params);
  29. }
  30. /**
  31. * Retrieve unsubscribe url for all products
  32. *
  33. * @return string
  34. */
  35. public function getUnsubscribeUrl()
  36. {
  37. return $this->getUrl('productalert/unsubscribe/priceAll', $this->_getUrlParams());
  38. }
  39. }