BundleOption.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Bundle\Model;
  7. use Magento\Framework\Model\AbstractExtensibleModel;
  8. use Magento\Bundle\Api\Data\BundleOptionInterface;
  9. class BundleOption extends AbstractExtensibleModel implements BundleOptionInterface
  10. {
  11. /**#@+
  12. * Constants
  13. */
  14. const OPTION_ID = 'option_id';
  15. const OPTION_QTY = 'option_qty';
  16. const OPTION_SELECTIONS = 'option_selections';
  17. /**#@-*/
  18. /**
  19. * {@inheritdoc}
  20. * @codeCoverageIgnore
  21. */
  22. public function getOptionId()
  23. {
  24. return $this->getData(self::OPTION_ID);
  25. }
  26. /**
  27. * {@inheritdoc}
  28. * @codeCoverageIgnore
  29. */
  30. public function getOptionQty()
  31. {
  32. return $this->getData(self::OPTION_QTY);
  33. }
  34. /**
  35. * {@inheritdoc}
  36. * @codeCoverageIgnore
  37. */
  38. public function getOptionSelections()
  39. {
  40. return $this->getData(self::OPTION_SELECTIONS);
  41. }
  42. /**
  43. * {@inheritdoc}
  44. * @codeCoverageIgnore
  45. */
  46. public function setOptionId($optionId)
  47. {
  48. return $this->setData(self::OPTION_ID, $optionId);
  49. }
  50. /**
  51. * {@inheritdoc}
  52. * @codeCoverageIgnore
  53. */
  54. public function setOptionQty($optionQty)
  55. {
  56. return $this->setData(self::OPTION_QTY, $optionQty);
  57. }
  58. /**
  59. * {@inheritdoc}
  60. * @codeCoverageIgnore
  61. */
  62. public function setOptionSelections(array $optionSelections)
  63. {
  64. return $this->setData(self::OPTION_SELECTIONS, $optionSelections);
  65. }
  66. /**
  67. * {@inheritdoc}
  68. * @codeCoverageIgnore
  69. */
  70. public function getExtensionAttributes()
  71. {
  72. return $this->_getExtensionAttributes();
  73. }
  74. /**
  75. * {@inheritdoc}
  76. * @codeCoverageIgnore
  77. */
  78. public function setExtensionAttributes(\Magento\Bundle\Api\Data\BundleOptionExtensionInterface $extensionAttributes)
  79. {
  80. return $this->_setExtensionAttributes($extensionAttributes);
  81. }
  82. }