Yesnocustom.php 640 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Used in creating options for Yes|No|Specified config value selection
  8. *
  9. */
  10. namespace Magento\Config\Model\Config\Source;
  11. /**
  12. * @api
  13. * @since 100.0.2
  14. */
  15. class Yesnocustom implements \Magento\Framework\Option\ArrayInterface
  16. {
  17. /**
  18. * Options getter
  19. *
  20. * @return array
  21. */
  22. public function toOptionArray()
  23. {
  24. return [
  25. ['value' => 1, 'label' => __('Yes')],
  26. ['value' => 0, 'label' => __('No')],
  27. ['value' => 2, 'label' => __('Specified')]
  28. ];
  29. }
  30. }