CustomOptionInterface.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Api\Data;
  7. /**
  8. * Interface CustomOptionInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface CustomOptionInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  13. {
  14. /**#@+
  15. * Constants
  16. */
  17. const OPTION_ID = 'option_id';
  18. const OPTION_VALUE = 'option_value';
  19. /**#@-*/
  20. /**
  21. * Get option id
  22. *
  23. * @return string
  24. */
  25. public function getOptionId();
  26. /**
  27. * Set option id
  28. *
  29. * @param string $value
  30. * @return bool
  31. */
  32. public function setOptionId($value);
  33. /**
  34. * Get option value
  35. *
  36. * @return string
  37. */
  38. public function getOptionValue();
  39. /**
  40. * Set option value
  41. *
  42. * @param string $value
  43. * @return bool
  44. */
  45. public function setOptionValue($value);
  46. /**
  47. * Retrieve existing extension attributes object or create a new one.
  48. *
  49. * @return \Magento\Catalog\Api\Data\CustomOptionExtensionInterface|null
  50. */
  51. public function getExtensionAttributes();
  52. /**
  53. * Set an extension attributes object.
  54. *
  55. * @param \Magento\Catalog\Api\Data\CustomOptionExtensionInterface|null $extensionAttributes
  56. * @return $this
  57. */
  58. public function setExtensionAttributes(
  59. \Magento\Catalog\Api\Data\CustomOptionExtensionInterface $extensionAttributes
  60. );
  61. }