NFC - Expand CRM-* comments with full @see annotations
[civicrm-core.git] / CRM / Contribute / DAO / ContributionPage.php
CommitLineData
e501603b 1<?php
c3fc2621 2
e501603b
TO
3/**
4 * @package CRM
ca5cec67 5 * @copyright CiviCRM LLC https://civicrm.org/licensing
e501603b
TO
6 *
7 * Generated from xml/schema/CRM/Contribute/ContributionPage.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
a9d0587b 9 * (GenCodeChecksum:63bc96be1f5552249e75545940c13bed)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the ContributionPage entity.
f41f0342 14 */
e501603b 15class 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 */
fa45b5b9 22 public 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 */
fa45b5b9 29 public static $_log = TRUE;
c3fc2621 30
e501603b
TO
31 /**
32 * Contribution Id
33 *
e6ca0a57 34 * @var int
e501603b
TO
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 *
e6ca0a57 55 * @var int
e501603b
TO
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 *
e6ca0a57 69 * @var bool
e501603b
TO
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 *
e6ca0a57 76 * @var bool
e501603b
TO
77 */
78 public $is_monetary;
c3fc2621 79
e501603b
TO
80 /**
81 * if true - allows recurring contributions, valid only for PayPal_Standard
82 *
e6ca0a57 83 * @var bool
e501603b
TO
84 */
85 public $is_recur;
c3fc2621 86
e501603b
TO
87 /**
88 * if false, the confirm page in contribution pages gets skipped
89 *
e6ca0a57 90 * @var bool
e501603b
TO
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 *
e6ca0a57 104 * @var bool
e501603b
TO
105 */
106 public $is_recur_interval;
c3fc2621 107
e501603b
TO
108 /**
109 * if true - asks user for recurring installments
110 *
e6ca0a57 111 * @var bool
e501603b
TO
112 */
113 public $is_recur_installments;
c3fc2621 114
e501603b
TO
115 /**
116 * if true - user is able to adjust payment start date
117 *
e6ca0a57 118 * @var bool
e501603b
TO
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 *
e6ca0a57 125 * @var bool
e501603b
TO
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 *
e6ca0a57 146 * @var bool
e501603b
TO
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 *
e6ca0a57 174 * @var bool
e501603b
TO
175 */
176 public $is_allow_other_amount;
c3fc2621 177
e501603b
TO
178 /**
179 * FK to civicrm_option_value.
180 *
e6ca0a57 181 * @var int
e501603b
TO
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 *
e6ca0a57 230 * @var bool
e501603b
TO
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 *
e6ca0a57 272 * @var bool
e501603b
TO
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 *
e6ca0a57 286 * @var bool
e501603b
TO
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 *
e6ca0a57 307 * @var int
e501603b
TO
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 *
e6ca0a57 328 * @var int
e501603b
TO
329 */
330 public $campaign_id;
c3fc2621 331
e501603b
TO
332 /**
333 * Can people share the contribution page through social media?
334 *
e6ca0a57 335 * @var bool
e501603b
TO
336 */
337 public $is_share;
c3fc2621 338
e501603b
TO
339 /**
340 * if true - billing block is required for online contribution page
341 *
e6ca0a57 342 * @var bool
e501603b
TO
343 */
344 public $is_billing_required;
c3fc2621 345
6489e3de
SL
346 /**
347 * Contribution Page Public title
348 *
349 * @var string
350 */
351 public $frontend_title;
352
e501603b 353 /**
f41f0342 354 * Class constructor.
e501603b 355 */
c3fc2621 356 public function __construct() {
e501603b
TO
357 $this->__table = 'civicrm_contribution_page';
358 parent::__construct();
359 }
c3fc2621 360
449c4e6b
CW
361 /**
362 * Returns localized title of this entity.
363 */
364 public static function getEntityTitle() {
365 return ts('Contribution Pages');
366 }
367
e501603b 368 /**
f41f0342 369 * Returns foreign keys and entity references.
e501603b
TO
370 *
371 * @return array
372 * [CRM_Core_Reference_Interface]
373 */
c3fc2621 374 public static function getReferenceColumns() {
346aaaba 375 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 376 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
377 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
378 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id');
379 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
346aaaba 380 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 381 }
346aaaba 382 return Civi::$statics[__CLASS__]['links'];
e501603b 383 }
c3fc2621 384
e501603b
TO
385 /**
386 * Returns all the column names of this table
387 *
388 * @return array
389 */
c3fc2621 390 public static function &fields() {
346aaaba 391 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
392 Civi::$statics[__CLASS__]['fields'] = [
393 'id' => [
e501603b
TO
394 'name' => 'id',
395 'type' => CRM_Utils_Type::T_INT,
c3fc2621 396 'title' => ts('Contribution Page ID'),
215b423e 397 'description' => ts('Contribution Id'),
c3fc2621 398 'required' => TRUE,
a36434b9 399 'where' => 'civicrm_contribution_page.id',
522a26c9 400 'table_name' => 'civicrm_contribution_page',
401 'entity' => 'ContributionPage',
402 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 403 'localizable' => 0,
a9d0587b 404 'add' => '1.3',
c3fc2621
CW
405 ],
406 'title' => [
e501603b
TO
407 'name' => 'title',
408 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 409 'title' => ts('Contribution Page Title'),
215b423e 410 'description' => ts('Contribution Page title. For top of page display'),
e501603b
TO
411 'maxlength' => 255,
412 'size' => CRM_Utils_Type::HUGE,
a36434b9 413 'where' => 'civicrm_contribution_page.title',
522a26c9 414 'table_name' => 'civicrm_contribution_page',
415 'entity' => 'ContributionPage',
416 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 417 'localizable' => 1,
a9d0587b 418 'add' => '1.3',
c3fc2621
CW
419 ],
420 'intro_text' => [
e501603b
TO
421 'name' => 'intro_text',
422 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 423 'title' => ts('Contribution Page Introduction Text'),
215b423e 424 'description' => ts('Text and html allowed. Displayed below title.'),
e501603b
TO
425 'rows' => 6,
426 'cols' => 50,
a36434b9 427 'where' => 'civicrm_contribution_page.intro_text',
522a26c9 428 'table_name' => 'civicrm_contribution_page',
429 'entity' => 'ContributionPage',
430 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 431 'localizable' => 1,
c3fc2621 432 'html' => [
e501603b 433 'type' => 'RichTextEditor',
c3fc2621 434 ],
a9d0587b 435 'add' => '1.3',
c3fc2621
CW
436 ],
437 'financial_type_id' => [
e501603b
TO
438 'name' => 'financial_type_id',
439 'type' => CRM_Utils_Type::T_INT,
c3fc2621 440 'title' => ts('Financial Type'),
215b423e 441 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
a36434b9 442 'where' => 'civicrm_contribution_page.financial_type_id',
522a26c9 443 'table_name' => 'civicrm_contribution_page',
444 'entity' => 'ContributionPage',
445 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 446 'localizable' => 0,
e501603b 447 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
c3fc2621 448 'html' => [
e501603b 449 'type' => 'Select',
c3fc2621
CW
450 ],
451 'pseudoconstant' => [
e501603b
TO
452 'table' => 'civicrm_financial_type',
453 'keyColumn' => 'id',
454 'labelColumn' => 'name',
e6ca0a57 455 ],
a9d0587b 456 'add' => '4.3',
c3fc2621
CW
457 ],
458 'payment_processor' => [
e501603b
TO
459 'name' => 'payment_processor',
460 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 461 'title' => ts('Payment Processor'),
215b423e 462 'description' => ts('Payment Processors configured for this contribution Page'),
e501603b
TO
463 'maxlength' => 128,
464 'size' => CRM_Utils_Type::HUGE,
a36434b9 465 'where' => 'civicrm_contribution_page.payment_processor',
522a26c9 466 'table_name' => 'civicrm_contribution_page',
467 'entity' => 'ContributionPage',
468 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 469 'localizable' => 0,
c3fc2621 470 'html' => [
e501603b 471 'type' => 'Select',
c3fc2621
CW
472 ],
473 'pseudoconstant' => [
e501603b
TO
474 'table' => 'civicrm_payment_processor',
475 'keyColumn' => 'id',
476 'labelColumn' => 'name',
e6ca0a57 477 ],
a9d0587b 478 'add' => '1.8',
c3fc2621
CW
479 ],
480 'is_credit_card_only' => [
e501603b
TO
481 'name' => 'is_credit_card_only',
482 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 483 'title' => ts('Is Credit Card Only?'),
215b423e 484 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
a36434b9 485 'where' => 'civicrm_contribution_page.is_credit_card_only',
45a83e42 486 'default' => '0',
522a26c9 487 'table_name' => 'civicrm_contribution_page',
488 'entity' => 'ContributionPage',
489 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 490 'localizable' => 0,
a9d0587b 491 'add' => '1.3',
c3fc2621
CW
492 ],
493 'is_monetary' => [
e501603b
TO
494 'name' => 'is_monetary',
495 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 496 'title' => ts('Is Monetary'),
215b423e 497 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
a36434b9 498 'where' => 'civicrm_contribution_page.is_monetary',
e501603b 499 'default' => '1',
522a26c9 500 'table_name' => 'civicrm_contribution_page',
501 'entity' => 'ContributionPage',
502 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 503 'localizable' => 0,
a9d0587b 504 'add' => '1.6',
c3fc2621
CW
505 ],
506 'is_recur' => [
e501603b
TO
507 'name' => 'is_recur',
508 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 509 'title' => ts('Is Recurring'),
215b423e 510 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
a36434b9 511 'where' => 'civicrm_contribution_page.is_recur',
45a83e42 512 'default' => '0',
522a26c9 513 'table_name' => 'civicrm_contribution_page',
514 'entity' => 'ContributionPage',
515 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 516 'localizable' => 0,
a9d0587b 517 'add' => '1.6',
c3fc2621
CW
518 ],
519 'is_confirm_enabled' => [
e501603b
TO
520 'name' => 'is_confirm_enabled',
521 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 522 'title' => ts('Confirmation Page?'),
215b423e 523 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
a36434b9 524 'where' => 'civicrm_contribution_page.is_confirm_enabled',
e501603b 525 'default' => '1',
522a26c9 526 'table_name' => 'civicrm_contribution_page',
527 'entity' => 'ContributionPage',
528 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 529 'localizable' => 0,
a9d0587b 530 'add' => '4.2',
c3fc2621
CW
531 ],
532 'recur_frequency_unit' => [
e501603b
TO
533 'name' => 'recur_frequency_unit',
534 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 535 'title' => ts('Recurring Frequency'),
215b423e 536 'description' => ts('Supported recurring frequency units.'),
e501603b
TO
537 'maxlength' => 128,
538 'size' => CRM_Utils_Type::HUGE,
a36434b9 539 'where' => 'civicrm_contribution_page.recur_frequency_unit',
522a26c9 540 'table_name' => 'civicrm_contribution_page',
541 'entity' => 'ContributionPage',
542 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 543 'localizable' => 0,
2a5c9b4d 544 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
c3fc2621 545 'html' => [
2a5c9b4d 546 'type' => 'Select',
c3fc2621
CW
547 ],
548 'pseudoconstant' => [
2a5c9b4d
CW
549 'optionGroupName' => 'recur_frequency_units',
550 'keyColumn' => 'name',
551 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
e6ca0a57 552 ],
a9d0587b 553 'add' => '2.1',
c3fc2621
CW
554 ],
555 'is_recur_interval' => [
e501603b
TO
556 'name' => 'is_recur_interval',
557 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 558 'title' => ts('Support Recurring Intervals'),
215b423e 559 'description' => ts('if true - supports recurring intervals'),
a36434b9 560 'where' => 'civicrm_contribution_page.is_recur_interval',
45a83e42 561 'default' => '0',
522a26c9 562 'table_name' => 'civicrm_contribution_page',
563 'entity' => 'ContributionPage',
564 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 565 'localizable' => 0,
a9d0587b 566 'add' => '2.1',
c3fc2621
CW
567 ],
568 'is_recur_installments' => [
e501603b
TO
569 'name' => 'is_recur_installments',
570 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 571 'title' => ts('Recurring Installments?'),
215b423e 572 'description' => ts('if true - asks user for recurring installments'),
a36434b9 573 'where' => 'civicrm_contribution_page.is_recur_installments',
45a83e42 574 'default' => '0',
522a26c9 575 'table_name' => 'civicrm_contribution_page',
576 'entity' => 'ContributionPage',
577 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 578 'localizable' => 0,
a9d0587b 579 'add' => '4.3',
c3fc2621
CW
580 ],
581 'adjust_recur_start_date' => [
e501603b
TO
582 'name' => 'adjust_recur_start_date',
583 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 584 'title' => ts('Adjust Recurring Start Date'),
215b423e 585 'description' => ts('if true - user is able to adjust payment start date'),
a36434b9 586 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
45a83e42 587 'default' => '0',
522a26c9 588 'table_name' => 'civicrm_contribution_page',
589 'entity' => 'ContributionPage',
590 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 591 'localizable' => 0,
a9d0587b 592 'add' => '4.7',
c3fc2621
CW
593 ],
594 'is_pay_later' => [
e501603b
TO
595 'name' => 'is_pay_later',
596 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 597 'title' => ts('Pay Later'),
215b423e 598 'description' => ts('if true - allows the user to send payment directly to the org later'),
a36434b9 599 'where' => 'civicrm_contribution_page.is_pay_later',
45a83e42 600 'default' => '0',
522a26c9 601 'table_name' => 'civicrm_contribution_page',
602 'entity' => 'ContributionPage',
603 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 604 'localizable' => 0,
a9d0587b 605 'add' => '2.0',
c3fc2621
CW
606 ],
607 'pay_later_text' => [
e501603b
TO
608 'name' => 'pay_later_text',
609 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 610 'title' => ts('Pay Later Text'),
215b423e 611 'description' => ts('The text displayed to the user in the main form'),
a36434b9 612 'where' => 'civicrm_contribution_page.pay_later_text',
522a26c9 613 'table_name' => 'civicrm_contribution_page',
614 'entity' => 'ContributionPage',
615 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 616 'localizable' => 1,
a9d0587b 617 'add' => '2.0',
c3fc2621
CW
618 ],
619 'pay_later_receipt' => [
e501603b
TO
620 'name' => 'pay_later_receipt',
621 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 622 'title' => ts('Pay Later Receipt'),
215b423e 623 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
a36434b9 624 'where' => 'civicrm_contribution_page.pay_later_receipt',
522a26c9 625 'table_name' => 'civicrm_contribution_page',
626 'entity' => 'ContributionPage',
627 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 628 'localizable' => 1,
a9d0587b 629 'add' => '2.0',
c3fc2621
CW
630 ],
631 'is_partial_payment' => [
e501603b
TO
632 'name' => 'is_partial_payment',
633 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 634 'title' => ts('Allow Partial Payment'),
215b423e 635 'description' => ts('is partial payment enabled for this online contribution page'),
a36434b9 636 'where' => 'civicrm_contribution_page.is_partial_payment',
45a83e42 637 'default' => '0',
522a26c9 638 'table_name' => 'civicrm_contribution_page',
639 'entity' => 'ContributionPage',
640 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 641 'localizable' => 0,
a9d0587b 642 'add' => '4.3',
c3fc2621
CW
643 ],
644 'initial_amount_label' => [
e501603b
TO
645 'name' => 'initial_amount_label',
646 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 647 'title' => ts('Initial Amount Label'),
215b423e 648 'description' => ts('Initial amount label for partial payment'),
e501603b
TO
649 'maxlength' => 255,
650 'size' => CRM_Utils_Type::HUGE,
a36434b9 651 'where' => 'civicrm_contribution_page.initial_amount_label',
522a26c9 652 'table_name' => 'civicrm_contribution_page',
653 'entity' => 'ContributionPage',
654 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 655 'localizable' => 1,
a9d0587b 656 'add' => '4.3',
c3fc2621
CW
657 ],
658 'initial_amount_help_text' => [
e501603b
TO
659 'name' => 'initial_amount_help_text',
660 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 661 'title' => ts('Initial Amount Help Text'),
215b423e 662 'description' => ts('Initial amount help text for partial payment'),
a36434b9 663 'where' => 'civicrm_contribution_page.initial_amount_help_text',
522a26c9 664 'table_name' => 'civicrm_contribution_page',
665 'entity' => 'ContributionPage',
666 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 667 'localizable' => 1,
a9d0587b 668 'add' => '4.3',
c3fc2621
CW
669 ],
670 'min_initial_amount' => [
e501603b
TO
671 'name' => 'min_initial_amount',
672 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 673 'title' => ts('Min Initial Amount'),
215b423e 674 'description' => ts('Minimum initial amount for partial payment'),
c3fc2621 675 'precision' => [
e501603b 676 20,
fb607354 677 2,
c3fc2621 678 ],
a36434b9 679 'where' => 'civicrm_contribution_page.min_initial_amount',
522a26c9 680 'table_name' => 'civicrm_contribution_page',
681 'entity' => 'ContributionPage',
682 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 683 'localizable' => 0,
a9d0587b 684 'add' => '4.3',
c3fc2621
CW
685 ],
686 'is_allow_other_amount' => [
e501603b
TO
687 'name' => 'is_allow_other_amount',
688 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 689 'title' => ts('Allow Other Amounts'),
215b423e 690 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
a36434b9 691 'where' => 'civicrm_contribution_page.is_allow_other_amount',
45a83e42 692 'default' => '0',
522a26c9 693 'table_name' => 'civicrm_contribution_page',
694 'entity' => 'ContributionPage',
695 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 696 'localizable' => 0,
a9d0587b 697 'add' => '1.3',
c3fc2621
CW
698 ],
699 'default_amount_id' => [
e501603b
TO
700 'name' => 'default_amount_id',
701 'type' => CRM_Utils_Type::T_INT,
c3fc2621 702 'title' => ts('Default Amount'),
215b423e 703 'description' => ts('FK to civicrm_option_value.'),
a36434b9 704 'where' => 'civicrm_contribution_page.default_amount_id',
522a26c9 705 'table_name' => 'civicrm_contribution_page',
706 'entity' => 'ContributionPage',
707 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 708 'localizable' => 0,
a9d0587b 709 'add' => '1.7',
c3fc2621
CW
710 ],
711 'min_amount' => [
e501603b
TO
712 'name' => 'min_amount',
713 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 714 'title' => ts('Minimum Amount'),
215b423e 715 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
c3fc2621 716 'precision' => [
e501603b 717 20,
fb607354 718 2,
c3fc2621 719 ],
a36434b9 720 'where' => 'civicrm_contribution_page.min_amount',
522a26c9 721 'table_name' => 'civicrm_contribution_page',
722 'entity' => 'ContributionPage',
723 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 724 'localizable' => 0,
a9d0587b 725 'add' => '1.3',
c3fc2621
CW
726 ],
727 'max_amount' => [
e501603b
TO
728 'name' => 'max_amount',
729 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 730 'title' => ts('Maximum Amount'),
215b423e 731 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
c3fc2621 732 'precision' => [
e501603b 733 20,
fb607354 734 2,
c3fc2621 735 ],
a36434b9 736 'where' => 'civicrm_contribution_page.max_amount',
522a26c9 737 'table_name' => 'civicrm_contribution_page',
738 'entity' => 'ContributionPage',
739 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 740 'localizable' => 0,
a9d0587b 741 'add' => '1.3',
c3fc2621
CW
742 ],
743 'goal_amount' => [
e501603b
TO
744 'name' => 'goal_amount',
745 'type' => CRM_Utils_Type::T_MONEY,
c3fc2621 746 'title' => ts('Goal Amount'),
215b423e 747 'description' => ts('The target goal for this page, allows people to build a goal meter'),
c3fc2621 748 'precision' => [
e501603b 749 20,
fb607354 750 2,
c3fc2621 751 ],
a36434b9 752 'where' => 'civicrm_contribution_page.goal_amount',
522a26c9 753 'table_name' => 'civicrm_contribution_page',
754 'entity' => 'ContributionPage',
755 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 756 'localizable' => 0,
a9d0587b 757 'add' => '1.5',
c3fc2621
CW
758 ],
759 'thankyou_title' => [
e501603b
TO
760 'name' => 'thankyou_title',
761 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 762 'title' => ts('Thank-you Title'),
215b423e 763 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
e501603b
TO
764 'maxlength' => 255,
765 'size' => CRM_Utils_Type::HUGE,
a36434b9 766 'where' => 'civicrm_contribution_page.thankyou_title',
522a26c9 767 'table_name' => 'civicrm_contribution_page',
768 'entity' => 'ContributionPage',
769 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 770 'localizable' => 1,
a9d0587b 771 'add' => '1.3',
c3fc2621
CW
772 ],
773 'thankyou_text' => [
e501603b
TO
774 'name' => 'thankyou_text',
775 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 776 'title' => ts('Thank-you Text'),
215b423e 777 'description' => ts('text and html allowed. displayed above result on success page'),
e501603b
TO
778 'rows' => 8,
779 'cols' => 60,
a36434b9 780 'where' => 'civicrm_contribution_page.thankyou_text',
522a26c9 781 'table_name' => 'civicrm_contribution_page',
782 'entity' => 'ContributionPage',
783 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 784 'localizable' => 1,
c3fc2621 785 'html' => [
e501603b 786 'type' => 'RichTextEditor',
c3fc2621 787 ],
a9d0587b 788 'add' => '1.3',
c3fc2621
CW
789 ],
790 'thankyou_footer' => [
e501603b
TO
791 'name' => 'thankyou_footer',
792 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 793 'title' => ts('Thank-you Footer'),
215b423e 794 '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
795 'rows' => 8,
796 'cols' => 60,
a36434b9 797 'where' => 'civicrm_contribution_page.thankyou_footer',
522a26c9 798 'table_name' => 'civicrm_contribution_page',
799 'entity' => 'ContributionPage',
800 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 801 'localizable' => 1,
c3fc2621 802 'html' => [
e501603b 803 'type' => 'RichTextEditor',
c3fc2621 804 ],
a9d0587b 805 'add' => '1.3',
c3fc2621
CW
806 ],
807 'is_email_receipt' => [
e501603b
TO
808 'name' => 'is_email_receipt',
809 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 810 'title' => ts('Send email Receipt'),
215b423e 811 'description' => ts('if true, receipt is automatically emailed to contact on success'),
a36434b9 812 'where' => 'civicrm_contribution_page.is_email_receipt',
45a83e42 813 'default' => '0',
522a26c9 814 'table_name' => 'civicrm_contribution_page',
815 'entity' => 'ContributionPage',
816 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 817 'localizable' => 0,
a9d0587b 818 'add' => '1.3',
c3fc2621
CW
819 ],
820 'receipt_from_name' => [
e501603b
TO
821 'name' => 'receipt_from_name',
822 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 823 'title' => ts('Receipt From'),
215b423e 824 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
e501603b
TO
825 'maxlength' => 255,
826 'size' => CRM_Utils_Type::HUGE,
a36434b9 827 'where' => 'civicrm_contribution_page.receipt_from_name',
522a26c9 828 'table_name' => 'civicrm_contribution_page',
829 'entity' => 'ContributionPage',
830 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 831 'localizable' => 1,
a9d0587b 832 'add' => '1.3',
c3fc2621
CW
833 ],
834 'receipt_from_email' => [
e501603b
TO
835 'name' => 'receipt_from_email',
836 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 837 'title' => ts('Receipt From email'),
215b423e 838 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
e501603b
TO
839 'maxlength' => 255,
840 'size' => CRM_Utils_Type::HUGE,
a36434b9 841 'where' => 'civicrm_contribution_page.receipt_from_email',
522a26c9 842 'table_name' => 'civicrm_contribution_page',
843 'entity' => 'ContributionPage',
844 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 845 'localizable' => 0,
a9d0587b 846 'add' => '1.3',
c3fc2621
CW
847 ],
848 'cc_receipt' => [
e501603b
TO
849 'name' => 'cc_receipt',
850 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 851 'title' => ts('Receipt cc'),
215b423e 852 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
e501603b
TO
853 'maxlength' => 255,
854 'size' => CRM_Utils_Type::HUGE,
a36434b9 855 'where' => 'civicrm_contribution_page.cc_receipt',
522a26c9 856 'table_name' => 'civicrm_contribution_page',
857 'entity' => 'ContributionPage',
858 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 859 'localizable' => 0,
a9d0587b 860 'add' => '1.3',
c3fc2621
CW
861 ],
862 'bcc_receipt' => [
e501603b
TO
863 'name' => 'bcc_receipt',
864 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 865 'title' => ts('Receipt bcc'),
215b423e 866 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
e501603b
TO
867 'maxlength' => 255,
868 'size' => CRM_Utils_Type::HUGE,
a36434b9 869 'where' => 'civicrm_contribution_page.bcc_receipt',
522a26c9 870 'table_name' => 'civicrm_contribution_page',
871 'entity' => 'ContributionPage',
872 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 873 'localizable' => 0,
a9d0587b 874 'add' => '1.3',
c3fc2621
CW
875 ],
876 'receipt_text' => [
e501603b
TO
877 'name' => 'receipt_text',
878 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 879 'title' => ts('Receipt Text'),
215b423e 880 '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
881 'rows' => 6,
882 'cols' => 50,
a36434b9 883 'where' => 'civicrm_contribution_page.receipt_text',
522a26c9 884 'table_name' => 'civicrm_contribution_page',
885 'entity' => 'ContributionPage',
886 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 887 'localizable' => 1,
c3fc2621 888 'html' => [
e501603b 889 'type' => 'TextArea',
c3fc2621 890 ],
a9d0587b 891 'add' => '1.3',
c3fc2621
CW
892 ],
893 'is_active' => [
e501603b
TO
894 'name' => 'is_active',
895 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 896 'title' => ts('Is Page Active?'),
215b423e 897 'description' => ts('Is this property active?'),
a36434b9 898 'where' => 'civicrm_contribution_page.is_active',
522a26c9 899 'table_name' => 'civicrm_contribution_page',
900 'entity' => 'ContributionPage',
901 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 902 'localizable' => 0,
a9d0587b 903 'add' => '1.3',
c3fc2621
CW
904 ],
905 'footer_text' => [
e501603b
TO
906 'name' => 'footer_text',
907 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 908 'title' => ts('Footer Text'),
215b423e 909 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
e501603b
TO
910 'rows' => 6,
911 'cols' => 50,
a36434b9 912 'where' => 'civicrm_contribution_page.footer_text',
522a26c9 913 'table_name' => 'civicrm_contribution_page',
914 'entity' => 'ContributionPage',
915 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 916 'localizable' => 1,
c3fc2621 917 'html' => [
e501603b 918 'type' => 'RichTextEditor',
c3fc2621 919 ],
a9d0587b 920 'add' => '1.4',
c3fc2621
CW
921 ],
922 'amount_block_is_active' => [
e501603b
TO
923 'name' => 'amount_block_is_active',
924 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 925 'title' => ts('Is Amount Block Active?'),
215b423e 926 'description' => ts('Is this property active?'),
a36434b9 927 'where' => 'civicrm_contribution_page.amount_block_is_active',
e501603b 928 'default' => '1',
522a26c9 929 'table_name' => 'civicrm_contribution_page',
930 'entity' => 'ContributionPage',
931 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 932 'localizable' => 0,
a9d0587b 933 'add' => '1.5',
c3fc2621
CW
934 ],
935 'start_date' => [
e501603b
TO
936 'name' => 'start_date',
937 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 938 'title' => ts('Contribution Page Start Date'),
215b423e 939 'description' => ts('Date and time that this page starts.'),
a36434b9 940 'where' => 'civicrm_contribution_page.start_date',
522a26c9 941 'table_name' => 'civicrm_contribution_page',
942 'entity' => 'ContributionPage',
943 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 944 'localizable' => 0,
a9d0587b 945 'add' => '1.8',
c3fc2621
CW
946 ],
947 'end_date' => [
e501603b
TO
948 'name' => 'end_date',
949 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 950 'title' => ts('Contribution Page End Date'),
215b423e 951 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
a36434b9 952 'where' => 'civicrm_contribution_page.end_date',
522a26c9 953 'table_name' => 'civicrm_contribution_page',
954 'entity' => 'ContributionPage',
955 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 956 'localizable' => 0,
a9d0587b 957 'add' => '1.8',
c3fc2621
CW
958 ],
959 'created_id' => [
e501603b
TO
960 'name' => 'created_id',
961 'type' => CRM_Utils_Type::T_INT,
c3fc2621 962 'title' => ts('Contribution Page Created By'),
215b423e 963 'description' => ts('FK to civicrm_contact, who created this contribution page'),
a36434b9 964 'where' => 'civicrm_contribution_page.created_id',
522a26c9 965 'table_name' => 'civicrm_contribution_page',
966 'entity' => 'ContributionPage',
967 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 968 'localizable' => 0,
e501603b 969 'FKClassName' => 'CRM_Contact_DAO_Contact',
a9d0587b 970 'add' => '3.0',
c3fc2621
CW
971 ],
972 'created_date' => [
e501603b
TO
973 'name' => 'created_date',
974 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
c3fc2621 975 'title' => ts('Contribution Page Created Date'),
215b423e 976 'description' => ts('Date and time that contribution page was created.'),
a36434b9 977 'where' => 'civicrm_contribution_page.created_date',
522a26c9 978 'table_name' => 'civicrm_contribution_page',
979 'entity' => 'ContributionPage',
980 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 981 'localizable' => 0,
a9d0587b 982 'add' => '3.0',
c3fc2621
CW
983 ],
984 'currency' => [
e501603b
TO
985 'name' => 'currency',
986 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 987 'title' => ts('Contribution Page Currency'),
215b423e 988 'description' => ts('3 character string, value from config setting or input via user.'),
e501603b
TO
989 'maxlength' => 3,
990 'size' => CRM_Utils_Type::FOUR,
a36434b9 991 'where' => 'civicrm_contribution_page.currency',
992 'headerPattern' => '/cur(rency)?/i',
993 'dataPattern' => '/^[A-Z]{3}$/i',
e501603b 994 'default' => 'NULL',
522a26c9 995 'table_name' => 'civicrm_contribution_page',
996 'entity' => 'ContributionPage',
997 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 998 'localizable' => 0,
c3fc2621 999 'html' => [
e501603b 1000 'type' => 'Select',
c3fc2621
CW
1001 ],
1002 'pseudoconstant' => [
e501603b
TO
1003 'table' => 'civicrm_currency',
1004 'keyColumn' => 'name',
1005 'labelColumn' => 'full_name',
1006 'nameColumn' => 'name',
a8fdb24e 1007 'abbrColumn' => 'symbol',
e6ca0a57 1008 ],
a9d0587b 1009 'add' => '3.3',
c3fc2621
CW
1010 ],
1011 'campaign_id' => [
e501603b
TO
1012 'name' => 'campaign_id',
1013 'type' => CRM_Utils_Type::T_INT,
c3fc2621 1014 'title' => ts('Contribution Page Campaign ID'),
215b423e 1015 'description' => ts('The campaign for which we are collecting contributions with this page.'),
a36434b9 1016 'where' => 'civicrm_contribution_page.campaign_id',
522a26c9 1017 'table_name' => 'civicrm_contribution_page',
1018 'entity' => 'ContributionPage',
1019 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 1020 'localizable' => 0,
e501603b 1021 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
c3fc2621 1022 'pseudoconstant' => [
e501603b
TO
1023 'table' => 'civicrm_campaign',
1024 'keyColumn' => 'id',
1025 'labelColumn' => 'title',
e6ca0a57 1026 ],
a9d0587b 1027 'add' => '3.4',
c3fc2621
CW
1028 ],
1029 'is_share' => [
e501603b
TO
1030 'name' => 'is_share',
1031 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1032 'title' => ts('Is Contribution Page Shared?'),
215b423e 1033 'description' => ts('Can people share the contribution page through social media?'),
a36434b9 1034 'where' => 'civicrm_contribution_page.is_share',
e501603b 1035 'default' => '1',
522a26c9 1036 'table_name' => 'civicrm_contribution_page',
1037 'entity' => 'ContributionPage',
1038 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 1039 'localizable' => 0,
a9d0587b 1040 'add' => '4.1',
c3fc2621
CW
1041 ],
1042 'is_billing_required' => [
e501603b
TO
1043 'name' => 'is_billing_required',
1044 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 1045 'title' => ts('Is billing block required'),
215b423e 1046 'description' => ts('if true - billing block is required for online contribution page'),
a36434b9 1047 'where' => 'civicrm_contribution_page.is_billing_required',
45a83e42 1048 'default' => '0',
522a26c9 1049 'table_name' => 'civicrm_contribution_page',
1050 'entity' => 'ContributionPage',
1051 'bao' => 'CRM_Contribute_BAO_ContributionPage',
6a7e5e5d 1052 'localizable' => 0,
a9d0587b 1053 'add' => '4.6',
c3fc2621 1054 ],
6489e3de
SL
1055 'contribution_page_frontend_title' => [
1056 'name' => 'frontend_title',
1057 'type' => CRM_Utils_Type::T_STRING,
1058 'title' => ts('Public Title'),
1059 'description' => ts('Contribution Page Public title'),
1060 'maxlength' => 255,
1061 'size' => CRM_Utils_Type::HUGE,
1062 'where' => 'civicrm_contribution_page.frontend_title',
1063 'default' => 'NULL',
1064 'table_name' => 'civicrm_contribution_page',
1065 'entity' => 'ContributionPage',
1066 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1067 'localizable' => 1,
1068 'html' => [
1069 'type' => 'Text',
1070 ],
a9d0587b 1071 'add' => '5.20',
6489e3de 1072 ],
c3fc2621 1073 ];
346aaaba 1074 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 1075 }
346aaaba 1076 return Civi::$statics[__CLASS__]['fields'];
e501603b 1077 }
c3fc2621 1078
e501603b 1079 /**
bd8e0b14 1080 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
1081 *
1082 * @return array
bd8e0b14 1083 * Array(string $name => string $uniqueName).
e501603b 1084 */
c3fc2621 1085 public static function &fieldKeys() {
bd8e0b14
TO
1086 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1087 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 1088 }
bd8e0b14 1089 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 1090 }
c3fc2621 1091
e501603b
TO
1092 /**
1093 * Returns the names of this table
1094 *
1095 * @return string
1096 */
c3fc2621 1097 public static function getTableName() {
e501603b
TO
1098 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
1099 }
c3fc2621 1100
e501603b
TO
1101 /**
1102 * Returns if this table needs to be logged
1103 *
c3fc2621 1104 * @return bool
e501603b 1105 */
c3fc2621 1106 public function getLog() {
e501603b
TO
1107 return self::$_log;
1108 }
c3fc2621 1109
e501603b
TO
1110 /**
1111 * Returns the list of fields that can be imported
1112 *
1113 * @param bool $prefix
1114 *
1115 * @return array
1116 */
c3fc2621
CW
1117 public static function &import($prefix = FALSE) {
1118 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_page', $prefix, []);
60808919 1119 return $r;
e501603b 1120 }
c3fc2621 1121
e501603b
TO
1122 /**
1123 * Returns the list of fields that can be exported
1124 *
1125 * @param bool $prefix
1126 *
1127 * @return array
1128 */
c3fc2621
CW
1129 public static function &export($prefix = FALSE) {
1130 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_page', $prefix, []);
60808919 1131 return $r;
e501603b 1132 }
c3fc2621 1133
e7a6b91a
AS
1134 /**
1135 * Returns the list of indices
c3fc2621
CW
1136 *
1137 * @param bool $localize
1138 *
1139 * @return array
e7a6b91a
AS
1140 */
1141 public static function indices($localize = TRUE) {
c3fc2621 1142 $indices = [];
e7a6b91a
AS
1143 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
1144 }
c3fc2621 1145
e501603b 1146}