ButtonStyles.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Paypal\Model\System\Config\Source;
  8. /**
  9. * Get button style options
  10. */
  11. class ButtonStyles
  12. {
  13. /**
  14. * Button color source getter
  15. *
  16. * @return array
  17. */
  18. public function getColor(): array
  19. {
  20. return [
  21. 'gold' => __('Gold'),
  22. 'blue' => __('Blue'),
  23. 'silver' => __('Silver'),
  24. 'black' => __('Black')
  25. ];
  26. }
  27. /**
  28. * Button layout source getter
  29. *
  30. * @return array
  31. */
  32. public function getLayout(): array
  33. {
  34. return [
  35. 'vertical' => __('Vertical'),
  36. 'horizontal' => __('Horizontal')
  37. ];
  38. }
  39. /**
  40. * Button shape source getter
  41. *
  42. * @return array
  43. */
  44. public function getShape(): array
  45. {
  46. return [
  47. 'pill' => __('Pill'),
  48. 'rect' => __('Rectangle')
  49. ];
  50. }
  51. /**
  52. * Button size source getter
  53. *
  54. * @return array
  55. */
  56. public function getSize(): array
  57. {
  58. return [
  59. 'medium' => __('Medium'),
  60. 'large' => __('Large'),
  61. 'responsive' => __('Responsive')
  62. ];
  63. }
  64. /**
  65. * Button label source getter
  66. *
  67. * @return array
  68. */
  69. public function getLabel(): array
  70. {
  71. return [
  72. 'checkout' => __('Checkout'),
  73. 'pay' => __('Pay'),
  74. 'buynow' => __('Buy Now'),
  75. 'paypal' => __('PayPal'),
  76. 'installment' => __('Installment'),
  77. 'credit' => __('Credit')
  78. ];
  79. }
  80. /**
  81. * Brazil button installment period source getter
  82. *
  83. * @return array
  84. */
  85. public function getBrInstallmentPeriod(): array
  86. {
  87. $numbers = range(2, 12);
  88. return array_combine($numbers, $numbers);
  89. }
  90. /**
  91. * Mexico button installment period source getter
  92. *
  93. * @return array
  94. */
  95. public function getMxInstallmentPeriod(): array
  96. {
  97. $numbers = range(3, 12, 3);
  98. return array_combine($numbers, $numbers);
  99. }
  100. }