SimpleActionOptionsProvider.php 899 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CatalogRule\Model\Rule\Action;
  7. class SimpleActionOptionsProvider implements \Magento\Framework\Data\OptionSourceInterface
  8. {
  9. /**
  10. * @return array
  11. */
  12. public function toOptionArray()
  13. {
  14. return [
  15. [
  16. 'label' => __('Apply as percentage of original'),
  17. 'value' => 'by_percent'
  18. ],
  19. [
  20. 'label' => __('Apply as fixed amount'),
  21. 'value' => 'by_fixed'
  22. ],
  23. [
  24. 'label' => __('Adjust final price to this percentage'),
  25. 'value' => 'to_percent'
  26. ],
  27. [
  28. 'label' => __('Adjust final price to discount value'),
  29. 'value' => 'to_fixed'
  30. ]
  31. ];
  32. }
  33. }