5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Contribute/ContributionPage.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:95842d15d54a368f68e6531a1b16797b)
13 * Database access object for the ContributionPage entity.
15 class CRM_Contribute_DAO_ContributionPage
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_contribution_page';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
39 * Contribution Page title. For top of page display
46 * Text and html allowed. Displayed below title.
53 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
57 public $financial_type_id;
60 * Payment Processors configured for this contribution Page
64 public $payment_processor;
67 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
71 public $is_credit_card_only;
74 * if true - allows real-time monetary transactions otherwise non-monetary transactions
81 * if true - allows recurring contributions, valid only for PayPal_Standard
88 * if false, the confirm page in contribution pages gets skipped
92 public $is_confirm_enabled;
95 * Supported recurring frequency units.
99 public $recur_frequency_unit;
102 * if true - supports recurring intervals
106 public $is_recur_interval;
109 * if true - asks user for recurring installments
113 public $is_recur_installments;
116 * if true - user is able to adjust payment start date
120 public $adjust_recur_start_date;
123 * if true - allows the user to send payment directly to the org later
127 public $is_pay_later;
130 * The text displayed to the user in the main form
134 public $pay_later_text;
137 * The receipt sent to the user instead of the normal receipt text
141 public $pay_later_receipt;
144 * is partial payment enabled for this online contribution page
148 public $is_partial_payment;
151 * Initial amount label for partial payment
155 public $initial_amount_label;
158 * Initial amount help text for partial payment
162 public $initial_amount_help_text;
165 * Minimum initial amount for partial payment
169 public $min_initial_amount;
172 * if true, page will include an input text field where user can enter their own amount
176 public $is_allow_other_amount;
179 * FK to civicrm_option_value.
183 public $default_amount_id;
186 * if other amounts allowed, user can configure minimum allowed.
193 * if other amounts allowed, user can configure maximum allowed.
200 * The target goal for this page, allows people to build a goal meter
207 * Title for Thank-you page (header title tag, and display at the top of the page).
211 public $thankyou_title;
214 * text and html allowed. displayed above result on success page
218 public $thankyou_text;
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.
225 public $thankyou_footer;
228 * if true, receipt is automatically emailed to contact on success
232 public $is_email_receipt;
235 * FROM email name used for receipts generated by contributions to this contribution page.
239 public $receipt_from_name;
242 * FROM email address used for receipts generated by contributions to this contribution page.
246 public $receipt_from_email;
249 * comma-separated list of email addresses to cc each time a receipt is sent
256 * comma-separated list of email addresses to bcc each time a receipt is sent
263 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
267 public $receipt_text;
270 * Is this property active?
277 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
284 * Is this property active?
288 public $amount_block_is_active;
291 * Date and time that this page starts.
298 * Date and time that this page ends. May be NULL if no defined end date/time
305 * FK to civicrm_contact, who created this contribution page
312 * Date and time that contribution page was created.
316 public $created_date;
319 * 3 character string, value from config setting or input via user.
326 * The campaign for which we are collecting contributions with this page.
333 * Can people share the contribution page through social media?
340 * if true - billing block is required for online contribution page
344 public $is_billing_required;
347 * Contribution Page Public title
351 public $frontend_title;
356 public function __construct() {
357 $this->__table
= 'civicrm_contribution_page';
358 parent
::__construct();
362 * Returns localized title of this entity.
364 public static function getEntityTitle() {
365 return ts('Contribution Pages');
369 * Returns foreign keys and entity references.
372 * [CRM_Core_Reference_Interface]
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']);
382 return Civi
::$statics[__CLASS__
]['links'];
386 * Returns all the column names of this table
390 public static function &fields() {
391 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
392 Civi
::$statics[__CLASS__
]['fields'] = [
395 'type' => CRM_Utils_Type
::T_INT
,
396 'title' => ts('Contribution Page ID'),
397 'description' => ts('Contribution Id'),
399 'where' => 'civicrm_contribution_page.id',
400 'table_name' => 'civicrm_contribution_page',
401 'entity' => 'ContributionPage',
402 'bao' => 'CRM_Contribute_BAO_ContributionPage',
407 'type' => CRM_Utils_Type
::T_STRING
,
408 'title' => ts('Contribution Page Title'),
409 'description' => ts('Contribution Page title. For top of page display'),
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',
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.'),
425 'where' => 'civicrm_contribution_page.intro_text',
426 'table_name' => 'civicrm_contribution_page',
427 'entity' => 'ContributionPage',
428 'bao' => 'CRM_Contribute_BAO_ContributionPage',
431 'type' => 'RichTextEditor',
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',
444 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
448 'pseudoconstant' => [
449 'table' => 'civicrm_financial_type',
451 'labelColumn' => 'name',
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'),
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',
469 'pseudoconstant' => [
470 'table' => 'civicrm_payment_processor',
472 'labelColumn' => 'name',
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',
482 'table_name' => 'civicrm_contribution_page',
483 'entity' => 'ContributionPage',
484 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
494 'table_name' => 'civicrm_contribution_page',
495 'entity' => 'ContributionPage',
496 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
506 'table_name' => 'civicrm_contribution_page',
507 'entity' => 'ContributionPage',
508 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
518 'table_name' => 'civicrm_contribution_page',
519 'entity' => 'ContributionPage',
520 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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.'),
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',
535 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
539 'pseudoconstant' => [
540 'optionGroupName' => 'recur_frequency_units',
541 'keyColumn' => 'name',
542 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
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',
552 'table_name' => 'civicrm_contribution_page',
553 'entity' => 'ContributionPage',
554 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
564 'table_name' => 'civicrm_contribution_page',
565 'entity' => 'ContributionPage',
566 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
576 'table_name' => 'civicrm_contribution_page',
577 'entity' => 'ContributionPage',
578 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
588 'table_name' => 'civicrm_contribution_page',
589 'entity' => 'ContributionPage',
590 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
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',
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',
622 'table_name' => 'civicrm_contribution_page',
623 'entity' => 'ContributionPage',
624 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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'),
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',
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',
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'),
660 'where' => 'civicrm_contribution_page.min_initial_amount',
661 'table_name' => 'civicrm_contribution_page',
662 'entity' => 'ContributionPage',
663 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
673 'table_name' => 'civicrm_contribution_page',
674 'entity' => 'ContributionPage',
675 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
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.'),
698 'where' => 'civicrm_contribution_page.min_amount',
699 'table_name' => 'civicrm_contribution_page',
700 'entity' => 'ContributionPage',
701 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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.'),
713 'where' => 'civicrm_contribution_page.max_amount',
714 'table_name' => 'civicrm_contribution_page',
715 'entity' => 'ContributionPage',
716 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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'),
728 'where' => 'civicrm_contribution_page.goal_amount',
729 'table_name' => 'civicrm_contribution_page',
730 'entity' => 'ContributionPage',
731 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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).'),
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',
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'),
754 'where' => 'civicrm_contribution_page.thankyou_text',
755 'table_name' => 'civicrm_contribution_page',
756 'entity' => 'ContributionPage',
757 'bao' => 'CRM_Contribute_BAO_ContributionPage',
760 'type' => 'RichTextEditor',
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.'),
770 'where' => 'civicrm_contribution_page.thankyou_footer',
771 'table_name' => 'civicrm_contribution_page',
772 'entity' => 'ContributionPage',
773 'bao' => 'CRM_Contribute_BAO_ContributionPage',
776 'type' => 'RichTextEditor',
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',
786 'table_name' => 'civicrm_contribution_page',
787 'entity' => 'ContributionPage',
788 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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.'),
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',
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.'),
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',
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'),
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',
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'),
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',
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'),
850 'where' => 'civicrm_contribution_page.receipt_text',
851 'table_name' => 'civicrm_contribution_page',
852 'entity' => 'ContributionPage',
853 'bao' => 'CRM_Contribute_BAO_ContributionPage',
856 'type' => 'TextArea',
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',
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.'),
877 'where' => 'civicrm_contribution_page.footer_text',
878 'table_name' => 'civicrm_contribution_page',
879 'entity' => 'ContributionPage',
880 'bao' => 'CRM_Contribute_BAO_ContributionPage',
883 'type' => 'RichTextEditor',
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',
893 'table_name' => 'civicrm_contribution_page',
894 'entity' => 'ContributionPage',
895 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
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',
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',
930 'FKClassName' => 'CRM_Contact_DAO_Contact',
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',
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.'),
949 'size' => CRM_Utils_Type
::FOUR
,
950 'where' => 'civicrm_contribution_page.currency',
951 'headerPattern' => '/cur(rency)?/i',
952 'dataPattern' => '/^[A-Z]{3}$/i',
954 'table_name' => 'civicrm_contribution_page',
955 'entity' => 'ContributionPage',
956 'bao' => 'CRM_Contribute_BAO_ContributionPage',
961 'pseudoconstant' => [
962 'table' => 'civicrm_currency',
963 'keyColumn' => 'name',
964 'labelColumn' => 'full_name',
965 'nameColumn' => 'name',
966 'abbrColumn' => 'symbol',
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',
979 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
980 'pseudoconstant' => [
981 'table' => 'civicrm_campaign',
983 'labelColumn' => 'title',
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',
993 'table_name' => 'civicrm_contribution_page',
994 'entity' => 'ContributionPage',
995 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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',
1005 'table_name' => 'civicrm_contribution_page',
1006 'entity' => 'ContributionPage',
1007 'bao' => 'CRM_Contribute_BAO_ContributionPage',
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'),
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',
1028 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1030 return Civi
::$statics[__CLASS__
]['fields'];
1034 * Return a mapping from field-name to the corresponding key (as used in fields()).
1037 * Array(string $name => string $uniqueName).
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()));
1043 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1047 * Returns the names of this table
1051 public static function getTableName() {
1052 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1056 * Returns if this table needs to be logged
1060 public function getLog() {
1065 * Returns the list of fields that can be imported
1067 * @param bool $prefix
1071 public static function &import($prefix = FALSE) {
1072 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1077 * Returns the list of fields that can be exported
1079 * @param bool $prefix
1083 public static function &export($prefix = FALSE) {
1084 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1089 * Returns the list of indices
1091 * @param bool $localize
1095 public static function indices($localize = TRUE) {
1097 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;