Apply.php 662 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Tax\Model\System\Config\Source;
  7. class Apply implements \Magento\Framework\Option\ArrayInterface
  8. {
  9. /**
  10. * @var array
  11. */
  12. protected $_options;
  13. /**
  14. * Initialize the options array
  15. */
  16. public function __construct()
  17. {
  18. $this->_options = [
  19. ['value' => 0, 'label' => __('Before Discount')],
  20. ['value' => 1, 'label' => __('After Discount')],
  21. ];
  22. }
  23. /**
  24. * @return array
  25. */
  26. public function toOptionArray()
  27. {
  28. return $this->_options;
  29. }
  30. }