Commit | Line | Data |
---|---|---|
e501603b | 1 | <?php |
c3fc2621 | 2 | |
e501603b TO |
3 | /** |
4 | * @package CRM | |
6b83d5bd | 5 | * @copyright CiviCRM LLC (c) 2004-2019 |
e501603b TO |
6 | * |
7 | * Generated from xml/schema/CRM/Contribute/ContributionPage.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
e380ee3b | 9 | * (GenCodeChecksum:923a4b6d8829d7aa6cc24e18d62114ff) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the ContributionPage entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO { |
c3fc2621 | 16 | |
e501603b | 17 | /** |
f41f0342 | 18 | * Static instance to hold the table name. |
e501603b TO |
19 | * |
20 | * @var string | |
21 | */ | |
22 | static $_tableName = 'civicrm_contribution_page'; | |
c3fc2621 | 23 | |
e501603b | 24 | /** |
f41f0342 | 25 | * Should CiviCRM log any modifications to this table in the civicrm_log table. |
e501603b | 26 | * |
c3fc2621 | 27 | * @var bool |
e501603b | 28 | */ |
c3fc2621 CW |
29 | static $_log = TRUE; |
30 | ||
e501603b TO |
31 | /** |
32 | * Contribution Id | |
33 | * | |
34 | * @var int unsigned | |
35 | */ | |
36 | public $id; | |
c3fc2621 | 37 | |
e501603b TO |
38 | /** |
39 | * Contribution Page title. For top of page display | |
40 | * | |
41 | * @var string | |
42 | */ | |
43 | public $title; | |
c3fc2621 | 44 | |
e501603b TO |
45 | /** |
46 | * Text and html allowed. Displayed below title. | |
47 | * | |
48 | * @var text | |
49 | */ | |
50 | public $intro_text; | |
c3fc2621 | 51 | |
e501603b TO |
52 | /** |
53 | * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution | |
54 | * | |
55 | * @var int unsigned | |
56 | */ | |
57 | public $financial_type_id; | |
c3fc2621 | 58 | |
e501603b TO |
59 | /** |
60 | * Payment Processors configured for this contribution Page | |
61 | * | |
62 | * @var string | |
63 | */ | |
64 | public $payment_processor; | |
c3fc2621 | 65 | |
e501603b TO |
66 | /** |
67 | * if true - processing logic must reject transaction at confirmation stage if pay method != credit card | |
68 | * | |
69 | * @var boolean | |
70 | */ | |
71 | public $is_credit_card_only; | |
c3fc2621 | 72 | |
e501603b TO |
73 | /** |
74 | * if true - allows real-time monetary transactions otherwise non-monetary transactions | |
75 | * | |
76 | * @var boolean | |
77 | */ | |
78 | public $is_monetary; | |
c3fc2621 | 79 | |
e501603b TO |
80 | /** |
81 | * if true - allows recurring contributions, valid only for PayPal_Standard | |
82 | * | |
83 | * @var boolean | |
84 | */ | |
85 | public $is_recur; | |
c3fc2621 | 86 | |
e501603b TO |
87 | /** |
88 | * if false, the confirm page in contribution pages gets skipped | |
89 | * | |
90 | * @var boolean | |
91 | */ | |
92 | public $is_confirm_enabled; | |
c3fc2621 | 93 | |
e501603b TO |
94 | /** |
95 | * Supported recurring frequency units. | |
96 | * | |
97 | * @var string | |
98 | */ | |
99 | public $recur_frequency_unit; | |
c3fc2621 | 100 | |
e501603b TO |
101 | /** |
102 | * if true - supports recurring intervals | |
103 | * | |
104 | * @var boolean | |
105 | */ | |
106 | public $is_recur_interval; | |
c3fc2621 | 107 | |
e501603b TO |
108 | /** |
109 | * if true - asks user for recurring installments | |
110 | * | |
111 | * @var boolean | |
112 | */ | |
113 | public $is_recur_installments; | |
c3fc2621 | 114 | |
e501603b TO |
115 | /** |
116 | * if true - user is able to adjust payment start date | |
117 | * | |
118 | * @var boolean | |
119 | */ | |
120 | public $adjust_recur_start_date; | |
c3fc2621 | 121 | |
e501603b TO |
122 | /** |
123 | * if true - allows the user to send payment directly to the org later | |
124 | * | |
125 | * @var boolean | |
126 | */ | |
127 | public $is_pay_later; | |
c3fc2621 | 128 | |
e501603b TO |
129 | /** |
130 | * The text displayed to the user in the main form | |
131 | * | |
132 | * @var text | |
133 | */ | |
134 | public $pay_later_text; | |
c3fc2621 | 135 | |
e501603b TO |
136 | /** |
137 | * The receipt sent to the user instead of the normal receipt text | |
138 | * | |
139 | * @var text | |
140 | */ | |
141 | public $pay_later_receipt; | |
c3fc2621 | 142 | |
e501603b TO |
143 | /** |
144 | * is partial payment enabled for this online contribution page | |
145 | * | |
146 | * @var boolean | |
147 | */ | |
148 | public $is_partial_payment; | |
c3fc2621 | 149 | |
e501603b TO |
150 | /** |
151 | * Initial amount label for partial payment | |
152 | * | |
153 | * @var string | |
154 | */ | |
155 | public $initial_amount_label; | |
c3fc2621 | 156 | |
e501603b TO |
157 | /** |
158 | * Initial amount help text for partial payment | |
159 | * | |
160 | * @var text | |
161 | */ | |
162 | public $initial_amount_help_text; | |
c3fc2621 | 163 | |
e501603b TO |
164 | /** |
165 | * Minimum initial amount for partial payment | |
166 | * | |
167 | * @var float | |
168 | */ | |
169 | public $min_initial_amount; | |
c3fc2621 | 170 | |
e501603b TO |
171 | /** |
172 | * if true, page will include an input text field where user can enter their own amount | |
173 | * | |
174 | * @var boolean | |
175 | */ | |
176 | public $is_allow_other_amount; | |
c3fc2621 | 177 | |
e501603b TO |
178 | /** |
179 | * FK to civicrm_option_value. | |
180 | * | |
181 | * @var int unsigned | |
182 | */ | |
183 | public $default_amount_id; | |
c3fc2621 | 184 | |
e501603b TO |
185 | /** |
186 | * if other amounts allowed, user can configure minimum allowed. | |
187 | * | |
188 | * @var float | |
189 | */ | |
190 | public $min_amount; | |
c3fc2621 | 191 | |
e501603b TO |
192 | /** |
193 | * if other amounts allowed, user can configure maximum allowed. | |
194 | * | |
195 | * @var float | |
196 | */ | |
197 | public $max_amount; | |
c3fc2621 | 198 | |
e501603b TO |
199 | /** |
200 | * The target goal for this page, allows people to build a goal meter | |
201 | * | |
202 | * @var float | |
203 | */ | |
204 | public $goal_amount; | |
c3fc2621 | 205 | |
e501603b TO |
206 | /** |
207 | * Title for Thank-you page (header title tag, and display at the top of the page). | |
208 | * | |
209 | * @var string | |
210 | */ | |
211 | public $thankyou_title; | |
c3fc2621 | 212 | |
e501603b TO |
213 | /** |
214 | * text and html allowed. displayed above result on success page | |
215 | * | |
216 | * @var text | |
217 | */ | |
218 | public $thankyou_text; | |
c3fc2621 | 219 | |
e501603b TO |
220 | /** |
221 | * Text and html allowed. displayed at the bottom of the success page. Common usage is to include link(s) to other pages such as tell-a-friend, etc. | |
222 | * | |
223 | * @var text | |
224 | */ | |
225 | public $thankyou_footer; | |
c3fc2621 | 226 | |
e501603b TO |
227 | /** |
228 | * if true, receipt is automatically emailed to contact on success | |
229 | * | |
230 | * @var boolean | |
231 | */ | |
232 | public $is_email_receipt; | |
c3fc2621 | 233 | |
e501603b TO |
234 | /** |
235 | * FROM email name used for receipts generated by contributions to this contribution page. | |
236 | * | |
237 | * @var string | |
238 | */ | |
239 | public $receipt_from_name; | |
c3fc2621 | 240 | |
e501603b TO |
241 | /** |
242 | * FROM email address used for receipts generated by contributions to this contribution page. | |
243 | * | |
244 | * @var string | |
245 | */ | |
246 | public $receipt_from_email; | |
c3fc2621 | 247 | |
e501603b TO |
248 | /** |
249 | * comma-separated list of email addresses to cc each time a receipt is sent | |
250 | * | |
251 | * @var string | |
252 | */ | |
253 | public $cc_receipt; | |
c3fc2621 | 254 | |
e501603b TO |
255 | /** |
256 | * comma-separated list of email addresses to bcc each time a receipt is sent | |
257 | * | |
258 | * @var string | |
259 | */ | |
260 | public $bcc_receipt; | |
c3fc2621 | 261 | |
e501603b TO |
262 | /** |
263 | * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now | |
264 | * | |
265 | * @var text | |
266 | */ | |
267 | public $receipt_text; | |
c3fc2621 | 268 | |
e501603b TO |
269 | /** |
270 | * Is this property active? | |
271 | * | |
272 | * @var boolean | |
273 | */ | |
274 | public $is_active; | |
c3fc2621 | 275 | |
e501603b TO |
276 | /** |
277 | * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard. | |
278 | * | |
279 | * @var text | |
280 | */ | |
281 | public $footer_text; | |
c3fc2621 | 282 | |
e501603b TO |
283 | /** |
284 | * Is this property active? | |
285 | * | |
286 | * @var boolean | |
287 | */ | |
288 | public $amount_block_is_active; | |
c3fc2621 | 289 | |
e501603b TO |
290 | /** |
291 | * Date and time that this page starts. | |
292 | * | |
293 | * @var datetime | |
294 | */ | |
295 | public $start_date; | |
c3fc2621 | 296 | |
e501603b TO |
297 | /** |
298 | * Date and time that this page ends. May be NULL if no defined end date/time | |
299 | * | |
300 | * @var datetime | |
301 | */ | |
302 | public $end_date; | |
c3fc2621 | 303 | |
e501603b TO |
304 | /** |
305 | * FK to civicrm_contact, who created this contribution page | |
306 | * | |
307 | * @var int unsigned | |
308 | */ | |
309 | public $created_id; | |
c3fc2621 | 310 | |
e501603b TO |
311 | /** |
312 | * Date and time that contribution page was created. | |
313 | * | |
314 | * @var datetime | |
315 | */ | |
316 | public $created_date; | |
c3fc2621 | 317 | |
e501603b TO |
318 | /** |
319 | * 3 character string, value from config setting or input via user. | |
320 | * | |
321 | * @var string | |
322 | */ | |
323 | public $currency; | |
c3fc2621 | 324 | |
e501603b TO |
325 | /** |
326 | * The campaign for which we are collecting contributions with this page. | |
327 | * | |
328 | * @var int unsigned | |
329 | */ | |
330 | public $campaign_id; | |
c3fc2621 | 331 | |
e501603b TO |
332 | /** |
333 | * Can people share the contribution page through social media? | |
334 | * | |
335 | * @var boolean | |
336 | */ | |
337 | public $is_share; | |
c3fc2621 | 338 | |
e501603b TO |
339 | /** |
340 | * if true - billing block is required for online contribution page | |
341 | * | |
342 | * @var boolean | |
343 | */ | |
344 | public $is_billing_required; | |
c3fc2621 | 345 | |
e501603b | 346 | /** |
f41f0342 | 347 | * Class constructor. |
e501603b | 348 | */ |
c3fc2621 | 349 | public function __construct() { |
e501603b TO |
350 | $this->__table = 'civicrm_contribution_page'; |
351 | parent::__construct(); | |
352 | } | |
c3fc2621 | 353 | |
e501603b | 354 | /** |
f41f0342 | 355 | * Returns foreign keys and entity references. |
e501603b TO |
356 | * |
357 | * @return array | |
358 | * [CRM_Core_Reference_Interface] | |
359 | */ | |
c3fc2621 | 360 | public static function getReferenceColumns() { |
346aaaba TO |
361 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
362 | Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__); | |
c3fc2621 CW |
363 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id'); |
364 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id'); | |
365 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id'); | |
346aaaba | 366 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); |
e501603b | 367 | } |
346aaaba | 368 | return Civi::$statics[__CLASS__]['links']; |
e501603b | 369 | } |
c3fc2621 | 370 | |
e501603b TO |
371 | /** |
372 | * Returns all the column names of this table | |
373 | * | |
374 | * @return array | |
375 | */ | |
c3fc2621 | 376 | public static function &fields() { |
346aaaba | 377 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
378 | Civi::$statics[__CLASS__]['fields'] = [ |
379 | 'id' => [ | |
e501603b TO |
380 | 'name' => 'id', |
381 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 382 | 'title' => ts('Contribution Page ID'), |
215b423e | 383 | 'description' => ts('Contribution Id'), |
c3fc2621 | 384 | 'required' => TRUE, |
522a26c9 | 385 | 'table_name' => 'civicrm_contribution_page', |
386 | 'entity' => 'ContributionPage', | |
387 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 388 | 'localizable' => 0, |
c3fc2621 CW |
389 | ], |
390 | 'title' => [ | |
e501603b TO |
391 | 'name' => 'title', |
392 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 393 | 'title' => ts('Contribution Page Title'), |
215b423e | 394 | 'description' => ts('Contribution Page title. For top of page display'), |
e501603b TO |
395 | 'maxlength' => 255, |
396 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 397 | 'table_name' => 'civicrm_contribution_page', |
398 | 'entity' => 'ContributionPage', | |
399 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 400 | 'localizable' => 1, |
c3fc2621 CW |
401 | ], |
402 | 'intro_text' => [ | |
e501603b TO |
403 | 'name' => 'intro_text', |
404 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 405 | 'title' => ts('Contribution Page Introduction Text'), |
215b423e | 406 | 'description' => ts('Text and html allowed. Displayed below title.'), |
e501603b TO |
407 | 'rows' => 6, |
408 | 'cols' => 50, | |
522a26c9 | 409 | 'table_name' => 'civicrm_contribution_page', |
410 | 'entity' => 'ContributionPage', | |
411 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 412 | 'localizable' => 1, |
c3fc2621 | 413 | 'html' => [ |
e501603b | 414 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
415 | ], |
416 | ], | |
417 | 'financial_type_id' => [ | |
e501603b TO |
418 | 'name' => 'financial_type_id', |
419 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 420 | 'title' => ts('Financial Type'), |
215b423e | 421 | 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'), |
522a26c9 | 422 | 'table_name' => 'civicrm_contribution_page', |
423 | 'entity' => 'ContributionPage', | |
424 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 425 | 'localizable' => 0, |
e501603b | 426 | 'FKClassName' => 'CRM_Financial_DAO_FinancialType', |
c3fc2621 | 427 | 'html' => [ |
e501603b | 428 | 'type' => 'Select', |
c3fc2621 CW |
429 | ], |
430 | 'pseudoconstant' => [ | |
e501603b TO |
431 | 'table' => 'civicrm_financial_type', |
432 | 'keyColumn' => 'id', | |
433 | 'labelColumn' => 'name', | |
c3fc2621 CW |
434 | ] |
435 | ], | |
436 | 'payment_processor' => [ | |
e501603b TO |
437 | 'name' => 'payment_processor', |
438 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 439 | 'title' => ts('Payment Processor'), |
215b423e | 440 | 'description' => ts('Payment Processors configured for this contribution Page'), |
e501603b TO |
441 | 'maxlength' => 128, |
442 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 443 | 'table_name' => 'civicrm_contribution_page', |
444 | 'entity' => 'ContributionPage', | |
445 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 446 | 'localizable' => 0, |
c3fc2621 | 447 | 'html' => [ |
e501603b | 448 | 'type' => 'Select', |
c3fc2621 CW |
449 | ], |
450 | 'pseudoconstant' => [ | |
e501603b TO |
451 | 'table' => 'civicrm_payment_processor', |
452 | 'keyColumn' => 'id', | |
453 | 'labelColumn' => 'name', | |
c3fc2621 CW |
454 | ] |
455 | ], | |
456 | 'is_credit_card_only' => [ | |
e501603b TO |
457 | 'name' => 'is_credit_card_only', |
458 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 459 | 'title' => ts('Is Credit Card Only?'), |
215b423e | 460 | 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'), |
45a83e42 | 461 | 'default' => '0', |
522a26c9 | 462 | 'table_name' => 'civicrm_contribution_page', |
463 | 'entity' => 'ContributionPage', | |
464 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 465 | 'localizable' => 0, |
c3fc2621 CW |
466 | ], |
467 | 'is_monetary' => [ | |
e501603b TO |
468 | 'name' => 'is_monetary', |
469 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 470 | 'title' => ts('Is Monetary'), |
215b423e | 471 | 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'), |
e501603b | 472 | 'default' => '1', |
522a26c9 | 473 | 'table_name' => 'civicrm_contribution_page', |
474 | 'entity' => 'ContributionPage', | |
475 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 476 | 'localizable' => 0, |
c3fc2621 CW |
477 | ], |
478 | 'is_recur' => [ | |
e501603b TO |
479 | 'name' => 'is_recur', |
480 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 481 | 'title' => ts('Is Recurring'), |
215b423e | 482 | 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'), |
45a83e42 | 483 | 'default' => '0', |
522a26c9 | 484 | 'table_name' => 'civicrm_contribution_page', |
485 | 'entity' => 'ContributionPage', | |
486 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 487 | 'localizable' => 0, |
c3fc2621 CW |
488 | ], |
489 | 'is_confirm_enabled' => [ | |
e501603b TO |
490 | 'name' => 'is_confirm_enabled', |
491 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 492 | 'title' => ts('Confirmation Page?'), |
215b423e | 493 | 'description' => ts('if false, the confirm page in contribution pages gets skipped'), |
e501603b | 494 | 'default' => '1', |
522a26c9 | 495 | 'table_name' => 'civicrm_contribution_page', |
496 | 'entity' => 'ContributionPage', | |
497 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 498 | 'localizable' => 0, |
c3fc2621 CW |
499 | ], |
500 | 'recur_frequency_unit' => [ | |
e501603b TO |
501 | 'name' => 'recur_frequency_unit', |
502 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 503 | 'title' => ts('Recurring Frequency'), |
215b423e | 504 | 'description' => ts('Supported recurring frequency units.'), |
e501603b TO |
505 | 'maxlength' => 128, |
506 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 507 | 'table_name' => 'civicrm_contribution_page', |
508 | 'entity' => 'ContributionPage', | |
509 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 510 | 'localizable' => 0, |
2a5c9b4d | 511 | 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED, |
c3fc2621 | 512 | 'html' => [ |
2a5c9b4d | 513 | 'type' => 'Select', |
c3fc2621 CW |
514 | ], |
515 | 'pseudoconstant' => [ | |
2a5c9b4d CW |
516 | 'optionGroupName' => 'recur_frequency_units', |
517 | 'keyColumn' => 'name', | |
518 | 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units', | |
c3fc2621 CW |
519 | ] |
520 | ], | |
521 | 'is_recur_interval' => [ | |
e501603b TO |
522 | 'name' => 'is_recur_interval', |
523 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 524 | 'title' => ts('Support Recurring Intervals'), |
215b423e | 525 | 'description' => ts('if true - supports recurring intervals'), |
45a83e42 | 526 | 'default' => '0', |
522a26c9 | 527 | 'table_name' => 'civicrm_contribution_page', |
528 | 'entity' => 'ContributionPage', | |
529 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 530 | 'localizable' => 0, |
c3fc2621 CW |
531 | ], |
532 | 'is_recur_installments' => [ | |
e501603b TO |
533 | 'name' => 'is_recur_installments', |
534 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 535 | 'title' => ts('Recurring Installments?'), |
215b423e | 536 | 'description' => ts('if true - asks user for recurring installments'), |
45a83e42 | 537 | 'default' => '0', |
522a26c9 | 538 | 'table_name' => 'civicrm_contribution_page', |
539 | 'entity' => 'ContributionPage', | |
540 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 541 | 'localizable' => 0, |
c3fc2621 CW |
542 | ], |
543 | 'adjust_recur_start_date' => [ | |
e501603b TO |
544 | 'name' => 'adjust_recur_start_date', |
545 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 546 | 'title' => ts('Adjust Recurring Start Date'), |
215b423e | 547 | 'description' => ts('if true - user is able to adjust payment start date'), |
45a83e42 | 548 | 'default' => '0', |
522a26c9 | 549 | 'table_name' => 'civicrm_contribution_page', |
550 | 'entity' => 'ContributionPage', | |
551 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 552 | 'localizable' => 0, |
c3fc2621 CW |
553 | ], |
554 | 'is_pay_later' => [ | |
e501603b TO |
555 | 'name' => 'is_pay_later', |
556 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 557 | 'title' => ts('Pay Later'), |
215b423e | 558 | 'description' => ts('if true - allows the user to send payment directly to the org later'), |
45a83e42 | 559 | 'default' => '0', |
522a26c9 | 560 | 'table_name' => 'civicrm_contribution_page', |
561 | 'entity' => 'ContributionPage', | |
562 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 563 | 'localizable' => 0, |
c3fc2621 CW |
564 | ], |
565 | 'pay_later_text' => [ | |
e501603b TO |
566 | 'name' => 'pay_later_text', |
567 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 568 | 'title' => ts('Pay Later Text'), |
215b423e | 569 | 'description' => ts('The text displayed to the user in the main form'), |
522a26c9 | 570 | 'table_name' => 'civicrm_contribution_page', |
571 | 'entity' => 'ContributionPage', | |
572 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 573 | 'localizable' => 1, |
c3fc2621 CW |
574 | ], |
575 | 'pay_later_receipt' => [ | |
e501603b TO |
576 | 'name' => 'pay_later_receipt', |
577 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 578 | 'title' => ts('Pay Later Receipt'), |
215b423e | 579 | 'description' => ts('The receipt sent to the user instead of the normal receipt text'), |
522a26c9 | 580 | 'table_name' => 'civicrm_contribution_page', |
581 | 'entity' => 'ContributionPage', | |
582 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 583 | 'localizable' => 1, |
c3fc2621 CW |
584 | ], |
585 | 'is_partial_payment' => [ | |
e501603b TO |
586 | 'name' => 'is_partial_payment', |
587 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 588 | 'title' => ts('Allow Partial Payment'), |
215b423e | 589 | 'description' => ts('is partial payment enabled for this online contribution page'), |
45a83e42 | 590 | 'default' => '0', |
522a26c9 | 591 | 'table_name' => 'civicrm_contribution_page', |
592 | 'entity' => 'ContributionPage', | |
593 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 594 | 'localizable' => 0, |
c3fc2621 CW |
595 | ], |
596 | 'initial_amount_label' => [ | |
e501603b TO |
597 | 'name' => 'initial_amount_label', |
598 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 599 | 'title' => ts('Initial Amount Label'), |
215b423e | 600 | 'description' => ts('Initial amount label for partial payment'), |
e501603b TO |
601 | 'maxlength' => 255, |
602 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 603 | 'table_name' => 'civicrm_contribution_page', |
604 | 'entity' => 'ContributionPage', | |
605 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 606 | 'localizable' => 1, |
c3fc2621 CW |
607 | ], |
608 | 'initial_amount_help_text' => [ | |
e501603b TO |
609 | 'name' => 'initial_amount_help_text', |
610 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 611 | 'title' => ts('Initial Amount Help Text'), |
215b423e | 612 | 'description' => ts('Initial amount help text for partial payment'), |
522a26c9 | 613 | 'table_name' => 'civicrm_contribution_page', |
614 | 'entity' => 'ContributionPage', | |
615 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 616 | 'localizable' => 1, |
c3fc2621 CW |
617 | ], |
618 | 'min_initial_amount' => [ | |
e501603b TO |
619 | 'name' => 'min_initial_amount', |
620 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 621 | 'title' => ts('Min Initial Amount'), |
215b423e | 622 | 'description' => ts('Minimum initial amount for partial payment'), |
c3fc2621 | 623 | 'precision' => [ |
e501603b TO |
624 | 20, |
625 | 2 | |
c3fc2621 | 626 | ], |
522a26c9 | 627 | 'table_name' => 'civicrm_contribution_page', |
628 | 'entity' => 'ContributionPage', | |
629 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 630 | 'localizable' => 0, |
c3fc2621 CW |
631 | ], |
632 | 'is_allow_other_amount' => [ | |
e501603b TO |
633 | 'name' => 'is_allow_other_amount', |
634 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 635 | 'title' => ts('Allow Other Amounts'), |
215b423e | 636 | 'description' => ts('if true, page will include an input text field where user can enter their own amount'), |
45a83e42 | 637 | 'default' => '0', |
522a26c9 | 638 | 'table_name' => 'civicrm_contribution_page', |
639 | 'entity' => 'ContributionPage', | |
640 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 641 | 'localizable' => 0, |
c3fc2621 CW |
642 | ], |
643 | 'default_amount_id' => [ | |
e501603b TO |
644 | 'name' => 'default_amount_id', |
645 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 646 | 'title' => ts('Default Amount'), |
215b423e | 647 | 'description' => ts('FK to civicrm_option_value.'), |
522a26c9 | 648 | 'table_name' => 'civicrm_contribution_page', |
649 | 'entity' => 'ContributionPage', | |
650 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 651 | 'localizable' => 0, |
c3fc2621 CW |
652 | ], |
653 | 'min_amount' => [ | |
e501603b TO |
654 | 'name' => 'min_amount', |
655 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 656 | 'title' => ts('Minimum Amount'), |
215b423e | 657 | 'description' => ts('if other amounts allowed, user can configure minimum allowed.'), |
c3fc2621 | 658 | 'precision' => [ |
e501603b TO |
659 | 20, |
660 | 2 | |
c3fc2621 | 661 | ], |
522a26c9 | 662 | 'table_name' => 'civicrm_contribution_page', |
663 | 'entity' => 'ContributionPage', | |
664 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 665 | 'localizable' => 0, |
c3fc2621 CW |
666 | ], |
667 | 'max_amount' => [ | |
e501603b TO |
668 | 'name' => 'max_amount', |
669 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 670 | 'title' => ts('Maximum Amount'), |
215b423e | 671 | 'description' => ts('if other amounts allowed, user can configure maximum allowed.'), |
c3fc2621 | 672 | 'precision' => [ |
e501603b TO |
673 | 20, |
674 | 2 | |
c3fc2621 | 675 | ], |
522a26c9 | 676 | 'table_name' => 'civicrm_contribution_page', |
677 | 'entity' => 'ContributionPage', | |
678 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 679 | 'localizable' => 0, |
c3fc2621 CW |
680 | ], |
681 | 'goal_amount' => [ | |
e501603b TO |
682 | 'name' => 'goal_amount', |
683 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 684 | 'title' => ts('Goal Amount'), |
215b423e | 685 | 'description' => ts('The target goal for this page, allows people to build a goal meter'), |
c3fc2621 | 686 | 'precision' => [ |
e501603b TO |
687 | 20, |
688 | 2 | |
c3fc2621 | 689 | ], |
522a26c9 | 690 | 'table_name' => 'civicrm_contribution_page', |
691 | 'entity' => 'ContributionPage', | |
692 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 693 | 'localizable' => 0, |
c3fc2621 CW |
694 | ], |
695 | 'thankyou_title' => [ | |
e501603b TO |
696 | 'name' => 'thankyou_title', |
697 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 698 | 'title' => ts('Thank-you Title'), |
215b423e | 699 | 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'), |
e501603b TO |
700 | 'maxlength' => 255, |
701 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 702 | 'table_name' => 'civicrm_contribution_page', |
703 | 'entity' => 'ContributionPage', | |
704 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 705 | 'localizable' => 1, |
c3fc2621 CW |
706 | ], |
707 | 'thankyou_text' => [ | |
e501603b TO |
708 | 'name' => 'thankyou_text', |
709 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 710 | 'title' => ts('Thank-you Text'), |
215b423e | 711 | 'description' => ts('text and html allowed. displayed above result on success page'), |
e501603b TO |
712 | 'rows' => 8, |
713 | 'cols' => 60, | |
522a26c9 | 714 | 'table_name' => 'civicrm_contribution_page', |
715 | 'entity' => 'ContributionPage', | |
716 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 717 | 'localizable' => 1, |
c3fc2621 | 718 | 'html' => [ |
e501603b | 719 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
720 | ], |
721 | ], | |
722 | 'thankyou_footer' => [ | |
e501603b TO |
723 | 'name' => 'thankyou_footer', |
724 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 725 | 'title' => ts('Thank-you Footer'), |
215b423e | 726 | 'description' => ts('Text and html allowed. displayed at the bottom of the success page. Common usage is to include link(s) to other pages such as tell-a-friend, etc.'), |
e501603b TO |
727 | 'rows' => 8, |
728 | 'cols' => 60, | |
522a26c9 | 729 | 'table_name' => 'civicrm_contribution_page', |
730 | 'entity' => 'ContributionPage', | |
731 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 732 | 'localizable' => 1, |
c3fc2621 | 733 | 'html' => [ |
e501603b | 734 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
735 | ], |
736 | ], | |
737 | 'is_email_receipt' => [ | |
e501603b TO |
738 | 'name' => 'is_email_receipt', |
739 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 740 | 'title' => ts('Send email Receipt'), |
215b423e | 741 | 'description' => ts('if true, receipt is automatically emailed to contact on success'), |
45a83e42 | 742 | 'default' => '0', |
522a26c9 | 743 | 'table_name' => 'civicrm_contribution_page', |
744 | 'entity' => 'ContributionPage', | |
745 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 746 | 'localizable' => 0, |
c3fc2621 CW |
747 | ], |
748 | 'receipt_from_name' => [ | |
e501603b TO |
749 | 'name' => 'receipt_from_name', |
750 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 751 | 'title' => ts('Receipt From'), |
215b423e | 752 | 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'), |
e501603b TO |
753 | 'maxlength' => 255, |
754 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 755 | 'table_name' => 'civicrm_contribution_page', |
756 | 'entity' => 'ContributionPage', | |
757 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 758 | 'localizable' => 1, |
c3fc2621 CW |
759 | ], |
760 | 'receipt_from_email' => [ | |
e501603b TO |
761 | 'name' => 'receipt_from_email', |
762 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 763 | 'title' => ts('Receipt From email'), |
215b423e | 764 | 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'), |
e501603b TO |
765 | 'maxlength' => 255, |
766 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 767 | 'table_name' => 'civicrm_contribution_page', |
768 | 'entity' => 'ContributionPage', | |
769 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 770 | 'localizable' => 0, |
c3fc2621 CW |
771 | ], |
772 | 'cc_receipt' => [ | |
e501603b TO |
773 | 'name' => 'cc_receipt', |
774 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 775 | 'title' => ts('Receipt cc'), |
215b423e | 776 | 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'), |
e501603b TO |
777 | 'maxlength' => 255, |
778 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 779 | 'table_name' => 'civicrm_contribution_page', |
780 | 'entity' => 'ContributionPage', | |
781 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 782 | 'localizable' => 0, |
c3fc2621 CW |
783 | ], |
784 | 'bcc_receipt' => [ | |
e501603b TO |
785 | 'name' => 'bcc_receipt', |
786 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 787 | 'title' => ts('Receipt bcc'), |
215b423e | 788 | 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'), |
e501603b TO |
789 | 'maxlength' => 255, |
790 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 791 | 'table_name' => 'civicrm_contribution_page', |
792 | 'entity' => 'ContributionPage', | |
793 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 794 | 'localizable' => 0, |
c3fc2621 CW |
795 | ], |
796 | 'receipt_text' => [ | |
e501603b TO |
797 | 'name' => 'receipt_text', |
798 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 799 | 'title' => ts('Receipt Text'), |
215b423e | 800 | 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'), |
e501603b TO |
801 | 'rows' => 6, |
802 | 'cols' => 50, | |
522a26c9 | 803 | 'table_name' => 'civicrm_contribution_page', |
804 | 'entity' => 'ContributionPage', | |
805 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 806 | 'localizable' => 1, |
c3fc2621 | 807 | 'html' => [ |
e501603b | 808 | 'type' => 'TextArea', |
c3fc2621 CW |
809 | ], |
810 | ], | |
811 | 'is_active' => [ | |
e501603b TO |
812 | 'name' => 'is_active', |
813 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 814 | 'title' => ts('Is Page Active?'), |
215b423e | 815 | 'description' => ts('Is this property active?'), |
522a26c9 | 816 | 'table_name' => 'civicrm_contribution_page', |
817 | 'entity' => 'ContributionPage', | |
818 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 819 | 'localizable' => 0, |
c3fc2621 CW |
820 | ], |
821 | 'footer_text' => [ | |
e501603b TO |
822 | 'name' => 'footer_text', |
823 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 824 | 'title' => ts('Footer Text'), |
215b423e | 825 | 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'), |
e501603b TO |
826 | 'rows' => 6, |
827 | 'cols' => 50, | |
522a26c9 | 828 | 'table_name' => 'civicrm_contribution_page', |
829 | 'entity' => 'ContributionPage', | |
830 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 831 | 'localizable' => 1, |
c3fc2621 | 832 | 'html' => [ |
e501603b | 833 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
834 | ], |
835 | ], | |
836 | 'amount_block_is_active' => [ | |
e501603b TO |
837 | 'name' => 'amount_block_is_active', |
838 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 839 | 'title' => ts('Is Amount Block Active?'), |
215b423e | 840 | 'description' => ts('Is this property active?'), |
e501603b | 841 | 'default' => '1', |
522a26c9 | 842 | 'table_name' => 'civicrm_contribution_page', |
843 | 'entity' => 'ContributionPage', | |
844 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 845 | 'localizable' => 0, |
c3fc2621 CW |
846 | ], |
847 | 'start_date' => [ | |
e501603b TO |
848 | 'name' => 'start_date', |
849 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 850 | 'title' => ts('Contribution Page Start Date'), |
215b423e | 851 | 'description' => ts('Date and time that this page starts.'), |
522a26c9 | 852 | 'table_name' => 'civicrm_contribution_page', |
853 | 'entity' => 'ContributionPage', | |
854 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 855 | 'localizable' => 0, |
c3fc2621 CW |
856 | ], |
857 | 'end_date' => [ | |
e501603b TO |
858 | 'name' => 'end_date', |
859 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 860 | 'title' => ts('Contribution Page End Date'), |
215b423e | 861 | 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'), |
522a26c9 | 862 | 'table_name' => 'civicrm_contribution_page', |
863 | 'entity' => 'ContributionPage', | |
864 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 865 | 'localizable' => 0, |
c3fc2621 CW |
866 | ], |
867 | 'created_id' => [ | |
e501603b TO |
868 | 'name' => 'created_id', |
869 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 870 | 'title' => ts('Contribution Page Created By'), |
215b423e | 871 | 'description' => ts('FK to civicrm_contact, who created this contribution page'), |
522a26c9 | 872 | 'table_name' => 'civicrm_contribution_page', |
873 | 'entity' => 'ContributionPage', | |
874 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 875 | 'localizable' => 0, |
e501603b | 876 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
c3fc2621 CW |
877 | ], |
878 | 'created_date' => [ | |
e501603b TO |
879 | 'name' => 'created_date', |
880 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 881 | 'title' => ts('Contribution Page Created Date'), |
215b423e | 882 | 'description' => ts('Date and time that contribution page was created.'), |
522a26c9 | 883 | 'table_name' => 'civicrm_contribution_page', |
884 | 'entity' => 'ContributionPage', | |
885 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 886 | 'localizable' => 0, |
c3fc2621 CW |
887 | ], |
888 | 'currency' => [ | |
e501603b TO |
889 | 'name' => 'currency', |
890 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 891 | 'title' => ts('Contribution Page Currency'), |
215b423e | 892 | 'description' => ts('3 character string, value from config setting or input via user.'), |
e501603b TO |
893 | 'maxlength' => 3, |
894 | 'size' => CRM_Utils_Type::FOUR, | |
895 | 'default' => 'NULL', | |
522a26c9 | 896 | 'table_name' => 'civicrm_contribution_page', |
897 | 'entity' => 'ContributionPage', | |
898 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 899 | 'localizable' => 0, |
c3fc2621 | 900 | 'html' => [ |
e501603b | 901 | 'type' => 'Select', |
c3fc2621 CW |
902 | ], |
903 | 'pseudoconstant' => [ | |
e501603b TO |
904 | 'table' => 'civicrm_currency', |
905 | 'keyColumn' => 'name', | |
906 | 'labelColumn' => 'full_name', | |
907 | 'nameColumn' => 'name', | |
c3fc2621 CW |
908 | ] |
909 | ], | |
910 | 'campaign_id' => [ | |
e501603b TO |
911 | 'name' => 'campaign_id', |
912 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 913 | 'title' => ts('Contribution Page Campaign ID'), |
215b423e | 914 | 'description' => ts('The campaign for which we are collecting contributions with this page.'), |
522a26c9 | 915 | 'table_name' => 'civicrm_contribution_page', |
916 | 'entity' => 'ContributionPage', | |
917 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 918 | 'localizable' => 0, |
e501603b | 919 | 'FKClassName' => 'CRM_Campaign_DAO_Campaign', |
c3fc2621 | 920 | 'pseudoconstant' => [ |
e501603b TO |
921 | 'table' => 'civicrm_campaign', |
922 | 'keyColumn' => 'id', | |
923 | 'labelColumn' => 'title', | |
c3fc2621 CW |
924 | ] |
925 | ], | |
926 | 'is_share' => [ | |
e501603b TO |
927 | 'name' => 'is_share', |
928 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 929 | 'title' => ts('Is Contribution Page Shared?'), |
215b423e | 930 | 'description' => ts('Can people share the contribution page through social media?'), |
e501603b | 931 | 'default' => '1', |
522a26c9 | 932 | 'table_name' => 'civicrm_contribution_page', |
933 | 'entity' => 'ContributionPage', | |
934 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 935 | 'localizable' => 0, |
c3fc2621 CW |
936 | ], |
937 | 'is_billing_required' => [ | |
e501603b TO |
938 | 'name' => 'is_billing_required', |
939 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 940 | 'title' => ts('Is billing block required'), |
215b423e | 941 | 'description' => ts('if true - billing block is required for online contribution page'), |
45a83e42 | 942 | 'default' => '0', |
522a26c9 | 943 | 'table_name' => 'civicrm_contribution_page', |
944 | 'entity' => 'ContributionPage', | |
945 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 946 | 'localizable' => 0, |
c3fc2621 CW |
947 | ], |
948 | ]; | |
346aaaba | 949 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 950 | } |
346aaaba | 951 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 952 | } |
c3fc2621 | 953 | |
e501603b | 954 | /** |
bd8e0b14 | 955 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
956 | * |
957 | * @return array | |
bd8e0b14 | 958 | * Array(string $name => string $uniqueName). |
e501603b | 959 | */ |
c3fc2621 | 960 | public static function &fieldKeys() { |
bd8e0b14 TO |
961 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
962 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 963 | } |
bd8e0b14 | 964 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 965 | } |
c3fc2621 | 966 | |
e501603b TO |
967 | /** |
968 | * Returns the names of this table | |
969 | * | |
970 | * @return string | |
971 | */ | |
c3fc2621 | 972 | public static function getTableName() { |
e501603b TO |
973 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); |
974 | } | |
c3fc2621 | 975 | |
e501603b TO |
976 | /** |
977 | * Returns if this table needs to be logged | |
978 | * | |
c3fc2621 | 979 | * @return bool |
e501603b | 980 | */ |
c3fc2621 | 981 | public function getLog() { |
e501603b TO |
982 | return self::$_log; |
983 | } | |
c3fc2621 | 984 | |
e501603b TO |
985 | /** |
986 | * Returns the list of fields that can be imported | |
987 | * | |
988 | * @param bool $prefix | |
989 | * | |
990 | * @return array | |
991 | */ | |
c3fc2621 CW |
992 | public static function &import($prefix = FALSE) { |
993 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_page', $prefix, []); | |
60808919 | 994 | return $r; |
e501603b | 995 | } |
c3fc2621 | 996 | |
e501603b TO |
997 | /** |
998 | * Returns the list of fields that can be exported | |
999 | * | |
1000 | * @param bool $prefix | |
1001 | * | |
1002 | * @return array | |
1003 | */ | |
c3fc2621 CW |
1004 | public static function &export($prefix = FALSE) { |
1005 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_page', $prefix, []); | |
60808919 | 1006 | return $r; |
e501603b | 1007 | } |
c3fc2621 | 1008 | |
e7a6b91a AS |
1009 | /** |
1010 | * Returns the list of indices | |
c3fc2621 CW |
1011 | * |
1012 | * @param bool $localize | |
1013 | * | |
1014 | * @return array | |
e7a6b91a AS |
1015 | */ |
1016 | public static function indices($localize = TRUE) { | |
c3fc2621 | 1017 | $indices = []; |
e7a6b91a AS |
1018 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
1019 | } | |
c3fc2621 | 1020 | |
e501603b | 1021 | } |