PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.15.5
GiveWP – Donation Plugin and Fundraising Platform v4.15.5
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Framework / FieldsAPI / DonationForm.php
DonationForm.php
77 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Framework\FieldsAPI;
4
5 use Give\Framework\FieldsAPI\Properties\DonationForm\CurrencySwitcherSetting;
6
7 /**
8 * @since 3.0.0
9 */
10 class DonationForm extends Form {
11 /**
12 * @since 3.0.0
13 *
14 * @var string
15 */
16 protected $defaultCurrency;
17
18 /**
19 * @since 3.0.0
20 *
21 * @var CurrencySwitcherSetting[]
22 */
23 protected $currencySwitcherSettings = [];
24
25 /**
26 * @since 3.0.0
27 *
28 * @var string
29 */
30 protected $currencySwitcherMessage;
31
32 /**
33 * @since 3.0.0
34 */
35 public function currencySwitcherSettings(CurrencySwitcherSetting ...$settings): DonationForm
36 {
37 $this->currencySwitcherSettings = $settings;
38
39 return $this;
40 }
41
42 /**
43 * @since 3.0.0
44 */
45 public function getCurrencySwitcherSettings(): array
46 {
47 return $this->currencySwitcherSettings;
48 }
49
50 /**
51 * @since 3.0.0
52 */
53 public function currencySwitcherMessage(string $message): DonationForm
54 {
55 $this->currencySwitcherMessage = $message;
56
57 return $this;
58 }
59
60 /**
61 * @since 3.0.0
62 */
63 public function defaultCurrency(string $currency): DonationForm
64 {
65 $this->defaultCurrency = $currency;
66
67 return $this;
68 }
69
70 /**
71 * @since 3.0.0
72 */
73 public function getDefaultCurrency(): string
74 {
75 return $this->defaultCurrency;
76 }
77 }