SourceInterface.php 596 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Eav\Model\Entity\Attribute\Source;
  7. /**
  8. * Entity attribute select source interface
  9. *
  10. * Source is providing the selection options for user interface
  11. *
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface SourceInterface
  16. {
  17. /**
  18. * Retrieve All options
  19. *
  20. * @return array
  21. */
  22. public function getAllOptions();
  23. /**
  24. * Retrieve Option value text
  25. *
  26. * @param string $value
  27. * @return mixed
  28. */
  29. public function getOptionText($value);
  30. }