OptionInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Customer\Api\Data;
  8. /**
  9. * Option interface.
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface OptionInterface
  14. {
  15. /**#@+
  16. * Constants for keys of data array
  17. */
  18. const LABEL = 'label';
  19. const VALUE = 'value';
  20. const OPTIONS = 'options';
  21. /**#@-*/
  22. /**
  23. * Get option label
  24. *
  25. * @return string
  26. */
  27. public function getLabel();
  28. /**
  29. * Set option label
  30. *
  31. * @param string $label
  32. * @return $this
  33. */
  34. public function setLabel($label);
  35. /**
  36. * Get option value
  37. *
  38. * @return string|null
  39. */
  40. public function getValue();
  41. /**
  42. * Set option value
  43. *
  44. * @param string $value
  45. * @return $this
  46. */
  47. public function setValue($value);
  48. /**
  49. * Get nested options
  50. *
  51. * @return \Magento\Customer\Api\Data\OptionInterface[]|null
  52. */
  53. public function getOptions();
  54. /**
  55. * Set nested options
  56. *
  57. * @param \Magento\Customer\Api\Data\OptionInterface[] $options
  58. * @return $this
  59. */
  60. public function setOptions(array $options = null);
  61. }