EmailLink.php 779 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Wishlist RSS URL to Email Block
  8. */
  9. namespace Magento\Wishlist\Block\Rss;
  10. /**
  11. * Class EmailLink
  12. *
  13. * @api
  14. * @SuppressWarnings(PHPMD.DepthOfInheritance)
  15. * @since 100.0.2
  16. */
  17. class EmailLink extends Link
  18. {
  19. /**
  20. * @var string
  21. */
  22. protected $_template = 'Magento_Wishlist::rss/email.phtml';
  23. /**
  24. * @return array
  25. */
  26. protected function getLinkParams()
  27. {
  28. $params = parent::getLinkParams();
  29. $wishlist = $this->wishlistHelper->getWishlist();
  30. $sharingCode = $wishlist->getSharingCode();
  31. if ($sharingCode) {
  32. $params['sharing_code'] = $sharingCode;
  33. }
  34. return $params;
  35. }
  36. }