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