OptionInterface.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Bundle\Api\Data;
  8. /**
  9. * Interface OptionInterface
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface OptionInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  14. {
  15. /**
  16. * Get option id
  17. *
  18. * @return int|null
  19. */
  20. public function getOptionId();
  21. /**
  22. * Set option id
  23. *
  24. * @param int $optionId
  25. * @return $this
  26. */
  27. public function setOptionId($optionId);
  28. /**
  29. * Get option title
  30. *
  31. * @return string|null
  32. */
  33. public function getTitle();
  34. /**
  35. * Set option title
  36. *
  37. * @param string $title
  38. * @return $this
  39. */
  40. public function setTitle($title);
  41. /**
  42. * Get is required option
  43. *
  44. * @return bool|null
  45. */
  46. public function getRequired();
  47. /**
  48. * Set whether option is required
  49. *
  50. * @param bool $required
  51. * @return $this
  52. */
  53. public function setRequired($required);
  54. /**
  55. * Get input type
  56. *
  57. * @return string|null
  58. */
  59. public function getType();
  60. /**
  61. * Set input type
  62. *
  63. * @param string $type
  64. * @return $this
  65. */
  66. public function setType($type);
  67. /**
  68. * Get option position
  69. *
  70. * @return int|null
  71. */
  72. public function getPosition();
  73. /**
  74. * Set option position
  75. *
  76. * @param int $position
  77. * @return $this
  78. */
  79. public function setPosition($position);
  80. /**
  81. * Get product sku
  82. *
  83. * @return string|null
  84. */
  85. public function getSku();
  86. /**
  87. * Set product sku
  88. *
  89. * @param string $sku
  90. * @return $this
  91. */
  92. public function setSku($sku);
  93. /**
  94. * Get product links
  95. *
  96. * @return \Magento\Bundle\Api\Data\LinkInterface[]|null
  97. */
  98. public function getProductLinks();
  99. /**
  100. * Set product links
  101. *
  102. * @param \Magento\Bundle\Api\Data\LinkInterface[] $productLinks
  103. * @return $this
  104. */
  105. public function setProductLinks(array $productLinks = null);
  106. /**
  107. * Retrieve existing extension attributes object or create a new one.
  108. *
  109. * @return \Magento\Bundle\Api\Data\OptionExtensionInterface|null
  110. */
  111. public function getExtensionAttributes();
  112. /**
  113. * Set an extension attributes object.
  114. *
  115. * @param \Magento\Bundle\Api\Data\OptionExtensionInterface $extensionAttributes
  116. * @return $this
  117. */
  118. public function setExtensionAttributes(\Magento\Bundle\Api\Data\OptionExtensionInterface $extensionAttributes);
  119. }