AttributeOptionInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Eav\Api\Data;
  8. /**
  9. * Created from:
  10. * @codeCoverageIgnore
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface AttributeOptionInterface
  15. {
  16. /**
  17. * Constants used as data array keys
  18. */
  19. const LABEL = 'label';
  20. const VALUE = 'value';
  21. const SORT_ORDER = 'sort_order';
  22. const STORE_LABELS = 'store_labels';
  23. const IS_DEFAULT = 'is_default';
  24. /**
  25. * Get option label
  26. *
  27. * @return string
  28. */
  29. public function getLabel();
  30. /**
  31. * Set option label
  32. *
  33. * @param string $label
  34. * @return $this
  35. */
  36. public function setLabel($label);
  37. /**
  38. * Get option value
  39. *
  40. * @return string
  41. */
  42. public function getValue();
  43. /**
  44. * Set option value
  45. *
  46. * @param string $value
  47. * @return string
  48. */
  49. public function setValue($value);
  50. /**
  51. * Get option order
  52. *
  53. * @return int|null
  54. */
  55. public function getSortOrder();
  56. /**
  57. * Set option order
  58. *
  59. * @param int $sortOrder
  60. * @return $this
  61. */
  62. public function setSortOrder($sortOrder);
  63. /**
  64. * is default
  65. *
  66. * @return bool|null
  67. */
  68. public function getIsDefault();
  69. /**
  70. * set is default
  71. *
  72. * @param bool $isDefault
  73. * @return $this
  74. */
  75. public function setIsDefault($isDefault);
  76. /**
  77. * Get option label for store scopes
  78. *
  79. * @return \Magento\Eav\Api\Data\AttributeOptionLabelInterface[]|null
  80. */
  81. public function getStoreLabels();
  82. /**
  83. * Set option label for store scopes
  84. *
  85. * @param \Magento\Eav\Api\Data\AttributeOptionLabelInterface[] $storeLabels
  86. * @return $this
  87. */
  88. public function setStoreLabels(array $storeLabels = null);
  89. }