SourceItemStatus.php 793 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventoryCatalogAdminUi\Model\OptionSource;
  8. use Magento\Framework\Data\OptionSourceInterface;
  9. use Magento\InventoryApi\Api\Data\SourceItemInterface;
  10. /**
  11. * Provide option values for UI
  12. */
  13. class SourceItemStatus implements OptionSourceInterface
  14. {
  15. /**
  16. * @inheritdoc
  17. */
  18. public function toOptionArray()
  19. {
  20. return [
  21. [
  22. 'value' => SourceItemInterface::STATUS_IN_STOCK,
  23. 'label' => __('In Stock'),
  24. ],
  25. [
  26. 'value' => SourceItemInterface::STATUS_OUT_OF_STOCK,
  27. 'label' => __('Out of Stock'),
  28. ],
  29. ];
  30. }
  31. }