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