DownloadableOption.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Downloadable\Model;
  7. use Magento\Downloadable\Api\Data\DownloadableOptionInterface;
  8. use Magento\Framework\Model\AbstractExtensibleModel;
  9. /**
  10. * @codeCoverageIgnore
  11. * @api
  12. * @since 100.0.2
  13. */
  14. class DownloadableOption extends AbstractExtensibleModel implements DownloadableOptionInterface
  15. {
  16. /**
  17. * Returns the list of downloadable links
  18. *
  19. * @return int[]
  20. */
  21. public function getDownloadableLinks()
  22. {
  23. return $this->getData(self::DOWNLOADABLE_LINKS);
  24. }
  25. /**
  26. * Sets the list of downloadable links
  27. *
  28. * @param int[] $downloadableLinks
  29. * @return $this
  30. */
  31. public function setDownloadableLinks($downloadableLinks)
  32. {
  33. return $this->setData(self::DOWNLOADABLE_LINKS, $downloadableLinks);
  34. }
  35. /**
  36. * Retrieve existing extension attributes object or create a new one.
  37. *
  38. * @return \Magento\Downloadable\Api\Data\DownloadableOptionExtensionInterface|null
  39. */
  40. public function getExtensionAttributes()
  41. {
  42. return $this->_getExtensionAttributes();
  43. }
  44. /**
  45. * Set an extension attributes object.
  46. *
  47. * @param \Magento\Downloadable\Api\Data\DownloadableOptionExtensionInterface $extensionAttributes
  48. * @return $this
  49. */
  50. public function setExtensionAttributes(
  51. \Magento\Downloadable\Api\Data\DownloadableOptionExtensionInterface $extensionAttributes
  52. ) {
  53. return $this->_setExtensionAttributes($extensionAttributes);
  54. }
  55. }