Algorithm.php 843 B

12345678910111213141516171819202122232425262728293031323334
  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 Algorithm 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' => \Magento\Tax\Model\Calculation::CALC_UNIT_BASE, 'label' => __('Unit Price')],
  20. ['value' => \Magento\Tax\Model\Calculation::CALC_ROW_BASE, 'label' => __('Row Total')],
  21. ['value' => \Magento\Tax\Model\Calculation::CALC_TOTAL_BASE, 'label' => __('Total')],
  22. ];
  23. }
  24. /**
  25. * @return array
  26. */
  27. public function toOptionArray()
  28. {
  29. return $this->_options;
  30. }
  31. }