Nooptreq.php 673 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Config\Model\Config\Source;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. class Nooptreq implements \Magento\Framework\Option\ArrayInterface
  12. {
  13. const VALUE_NO = '';
  14. const VALUE_OPTIONAL = 'opt';
  15. const VALUE_REQUIRED = 'req';
  16. /**
  17. * @return array
  18. */
  19. public function toOptionArray()
  20. {
  21. return [
  22. ['value' => self::VALUE_NO, 'label' => __('No')],
  23. ['value' => self::VALUE_OPTIONAL, 'label' => __('Optional')],
  24. ['value' => self::VALUE_REQUIRED, 'label' => __('Required')]
  25. ];
  26. }
  27. }