PriceBoxRenderInterface.php 936 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Pricing\Render;
  7. use Magento\Framework\Pricing\Amount\AmountInterface;
  8. use Magento\Framework\Pricing\SaleableInterface;
  9. use Magento\Framework\Pricing\Price\PriceInterface;
  10. /**
  11. * Price box render interface
  12. *
  13. * @api
  14. * @since 100.0.2
  15. */
  16. interface PriceBoxRenderInterface
  17. {
  18. /**
  19. * @return SaleableInterface
  20. */
  21. public function getSaleableItem();
  22. /**
  23. * Retrieve price object
  24. * (to use in templates only)
  25. *
  26. * @return PriceInterface
  27. */
  28. public function getPrice();
  29. /**
  30. * Retrieve amount html for given price and arguments
  31. * (to use in templates only)
  32. *
  33. * @param AmountInterface $price
  34. * @param array $arguments
  35. * @return string
  36. */
  37. public function renderAmount(AmountInterface $price, array $arguments = []);
  38. }