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:382259aca3342191a285c0984cab168b)
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 foreign keys and entity references.
365 * [CRM_Core_Reference_Interface]
367 public static function getReferenceColumns() {
368 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
369 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
370 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
371 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
372 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
373 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
375 return Civi
::$statics[__CLASS__
]['links'];
379 * Returns all the column names of this table
383 public static function &fields() {
384 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
385 Civi
::$statics[__CLASS__
]['fields'] = [
388 'type' => CRM_Utils_Type
::T_INT
,
389 'title' => ts('Contribution Page ID'),
390 'description' => ts('Contribution Id'),
392 'where' => 'civicrm_contribution_page.id',
393 'table_name' => 'civicrm_contribution_page',
394 'entity' => 'ContributionPage',
395 'bao' => 'CRM_Contribute_BAO_ContributionPage',
400 'type' => CRM_Utils_Type
::T_STRING
,
401 'title' => ts('Contribution Page Title'),
402 'description' => ts('Contribution Page title. For top of page display'),
404 'size' => CRM_Utils_Type
::HUGE
,
405 'where' => 'civicrm_contribution_page.title',
406 'table_name' => 'civicrm_contribution_page',
407 'entity' => 'ContributionPage',
408 'bao' => 'CRM_Contribute_BAO_ContributionPage',
412 'name' => 'intro_text',
413 'type' => CRM_Utils_Type
::T_TEXT
,
414 'title' => ts('Contribution Page Introduction Text'),
415 'description' => ts('Text and html allowed. Displayed below title.'),
418 'where' => 'civicrm_contribution_page.intro_text',
419 'table_name' => 'civicrm_contribution_page',
420 'entity' => 'ContributionPage',
421 'bao' => 'CRM_Contribute_BAO_ContributionPage',
424 'type' => 'RichTextEditor',
427 'financial_type_id' => [
428 'name' => 'financial_type_id',
429 'type' => CRM_Utils_Type
::T_INT
,
430 'title' => ts('Financial Type'),
431 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
432 'where' => 'civicrm_contribution_page.financial_type_id',
433 'table_name' => 'civicrm_contribution_page',
434 'entity' => 'ContributionPage',
435 'bao' => 'CRM_Contribute_BAO_ContributionPage',
437 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
441 'pseudoconstant' => [
442 'table' => 'civicrm_financial_type',
444 'labelColumn' => 'name',
447 'payment_processor' => [
448 'name' => 'payment_processor',
449 'type' => CRM_Utils_Type
::T_STRING
,
450 'title' => ts('Payment Processor'),
451 'description' => ts('Payment Processors configured for this contribution Page'),
453 'size' => CRM_Utils_Type
::HUGE
,
454 'where' => 'civicrm_contribution_page.payment_processor',
455 'table_name' => 'civicrm_contribution_page',
456 'entity' => 'ContributionPage',
457 'bao' => 'CRM_Contribute_BAO_ContributionPage',
462 'pseudoconstant' => [
463 'table' => 'civicrm_payment_processor',
465 'labelColumn' => 'name',
468 'is_credit_card_only' => [
469 'name' => 'is_credit_card_only',
470 'type' => CRM_Utils_Type
::T_BOOLEAN
,
471 'title' => ts('Is Credit Card Only?'),
472 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
473 'where' => 'civicrm_contribution_page.is_credit_card_only',
475 'table_name' => 'civicrm_contribution_page',
476 'entity' => 'ContributionPage',
477 'bao' => 'CRM_Contribute_BAO_ContributionPage',
481 'name' => 'is_monetary',
482 'type' => CRM_Utils_Type
::T_BOOLEAN
,
483 'title' => ts('Is Monetary'),
484 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
485 'where' => 'civicrm_contribution_page.is_monetary',
487 'table_name' => 'civicrm_contribution_page',
488 'entity' => 'ContributionPage',
489 'bao' => 'CRM_Contribute_BAO_ContributionPage',
493 'name' => 'is_recur',
494 'type' => CRM_Utils_Type
::T_BOOLEAN
,
495 'title' => ts('Is Recurring'),
496 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
497 'where' => 'civicrm_contribution_page.is_recur',
499 'table_name' => 'civicrm_contribution_page',
500 'entity' => 'ContributionPage',
501 'bao' => 'CRM_Contribute_BAO_ContributionPage',
504 'is_confirm_enabled' => [
505 'name' => 'is_confirm_enabled',
506 'type' => CRM_Utils_Type
::T_BOOLEAN
,
507 'title' => ts('Confirmation Page?'),
508 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
509 'where' => 'civicrm_contribution_page.is_confirm_enabled',
511 'table_name' => 'civicrm_contribution_page',
512 'entity' => 'ContributionPage',
513 'bao' => 'CRM_Contribute_BAO_ContributionPage',
516 'recur_frequency_unit' => [
517 'name' => 'recur_frequency_unit',
518 'type' => CRM_Utils_Type
::T_STRING
,
519 'title' => ts('Recurring Frequency'),
520 'description' => ts('Supported recurring frequency units.'),
522 'size' => CRM_Utils_Type
::HUGE
,
523 'where' => 'civicrm_contribution_page.recur_frequency_unit',
524 'table_name' => 'civicrm_contribution_page',
525 'entity' => 'ContributionPage',
526 'bao' => 'CRM_Contribute_BAO_ContributionPage',
528 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
532 'pseudoconstant' => [
533 'optionGroupName' => 'recur_frequency_units',
534 'keyColumn' => 'name',
535 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
538 'is_recur_interval' => [
539 'name' => 'is_recur_interval',
540 'type' => CRM_Utils_Type
::T_BOOLEAN
,
541 'title' => ts('Support Recurring Intervals'),
542 'description' => ts('if true - supports recurring intervals'),
543 'where' => 'civicrm_contribution_page.is_recur_interval',
545 'table_name' => 'civicrm_contribution_page',
546 'entity' => 'ContributionPage',
547 'bao' => 'CRM_Contribute_BAO_ContributionPage',
550 'is_recur_installments' => [
551 'name' => 'is_recur_installments',
552 'type' => CRM_Utils_Type
::T_BOOLEAN
,
553 'title' => ts('Recurring Installments?'),
554 'description' => ts('if true - asks user for recurring installments'),
555 'where' => 'civicrm_contribution_page.is_recur_installments',
557 'table_name' => 'civicrm_contribution_page',
558 'entity' => 'ContributionPage',
559 'bao' => 'CRM_Contribute_BAO_ContributionPage',
562 'adjust_recur_start_date' => [
563 'name' => 'adjust_recur_start_date',
564 'type' => CRM_Utils_Type
::T_BOOLEAN
,
565 'title' => ts('Adjust Recurring Start Date'),
566 'description' => ts('if true - user is able to adjust payment start date'),
567 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
569 'table_name' => 'civicrm_contribution_page',
570 'entity' => 'ContributionPage',
571 'bao' => 'CRM_Contribute_BAO_ContributionPage',
575 'name' => 'is_pay_later',
576 'type' => CRM_Utils_Type
::T_BOOLEAN
,
577 'title' => ts('Pay Later'),
578 'description' => ts('if true - allows the user to send payment directly to the org later'),
579 'where' => 'civicrm_contribution_page.is_pay_later',
581 'table_name' => 'civicrm_contribution_page',
582 'entity' => 'ContributionPage',
583 'bao' => 'CRM_Contribute_BAO_ContributionPage',
586 'pay_later_text' => [
587 'name' => 'pay_later_text',
588 'type' => CRM_Utils_Type
::T_TEXT
,
589 'title' => ts('Pay Later Text'),
590 'description' => ts('The text displayed to the user in the main form'),
591 'where' => 'civicrm_contribution_page.pay_later_text',
592 'table_name' => 'civicrm_contribution_page',
593 'entity' => 'ContributionPage',
594 'bao' => 'CRM_Contribute_BAO_ContributionPage',
597 'pay_later_receipt' => [
598 'name' => 'pay_later_receipt',
599 'type' => CRM_Utils_Type
::T_TEXT
,
600 'title' => ts('Pay Later Receipt'),
601 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
602 'where' => 'civicrm_contribution_page.pay_later_receipt',
603 'table_name' => 'civicrm_contribution_page',
604 'entity' => 'ContributionPage',
605 'bao' => 'CRM_Contribute_BAO_ContributionPage',
608 'is_partial_payment' => [
609 'name' => 'is_partial_payment',
610 'type' => CRM_Utils_Type
::T_BOOLEAN
,
611 'title' => ts('Allow Partial Payment'),
612 'description' => ts('is partial payment enabled for this online contribution page'),
613 'where' => 'civicrm_contribution_page.is_partial_payment',
615 'table_name' => 'civicrm_contribution_page',
616 'entity' => 'ContributionPage',
617 'bao' => 'CRM_Contribute_BAO_ContributionPage',
620 'initial_amount_label' => [
621 'name' => 'initial_amount_label',
622 'type' => CRM_Utils_Type
::T_STRING
,
623 'title' => ts('Initial Amount Label'),
624 'description' => ts('Initial amount label for partial payment'),
626 'size' => CRM_Utils_Type
::HUGE
,
627 'where' => 'civicrm_contribution_page.initial_amount_label',
628 'table_name' => 'civicrm_contribution_page',
629 'entity' => 'ContributionPage',
630 'bao' => 'CRM_Contribute_BAO_ContributionPage',
633 'initial_amount_help_text' => [
634 'name' => 'initial_amount_help_text',
635 'type' => CRM_Utils_Type
::T_TEXT
,
636 'title' => ts('Initial Amount Help Text'),
637 'description' => ts('Initial amount help text for partial payment'),
638 'where' => 'civicrm_contribution_page.initial_amount_help_text',
639 'table_name' => 'civicrm_contribution_page',
640 'entity' => 'ContributionPage',
641 'bao' => 'CRM_Contribute_BAO_ContributionPage',
644 'min_initial_amount' => [
645 'name' => 'min_initial_amount',
646 'type' => CRM_Utils_Type
::T_MONEY
,
647 'title' => ts('Min Initial Amount'),
648 'description' => ts('Minimum initial amount for partial payment'),
653 'where' => 'civicrm_contribution_page.min_initial_amount',
654 'table_name' => 'civicrm_contribution_page',
655 'entity' => 'ContributionPage',
656 'bao' => 'CRM_Contribute_BAO_ContributionPage',
659 'is_allow_other_amount' => [
660 'name' => 'is_allow_other_amount',
661 'type' => CRM_Utils_Type
::T_BOOLEAN
,
662 'title' => ts('Allow Other Amounts'),
663 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
664 'where' => 'civicrm_contribution_page.is_allow_other_amount',
666 'table_name' => 'civicrm_contribution_page',
667 'entity' => 'ContributionPage',
668 'bao' => 'CRM_Contribute_BAO_ContributionPage',
671 'default_amount_id' => [
672 'name' => 'default_amount_id',
673 'type' => CRM_Utils_Type
::T_INT
,
674 'title' => ts('Default Amount'),
675 'description' => ts('FK to civicrm_option_value.'),
676 'where' => 'civicrm_contribution_page.default_amount_id',
677 'table_name' => 'civicrm_contribution_page',
678 'entity' => 'ContributionPage',
679 'bao' => 'CRM_Contribute_BAO_ContributionPage',
683 'name' => 'min_amount',
684 'type' => CRM_Utils_Type
::T_MONEY
,
685 'title' => ts('Minimum Amount'),
686 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
691 'where' => 'civicrm_contribution_page.min_amount',
692 'table_name' => 'civicrm_contribution_page',
693 'entity' => 'ContributionPage',
694 'bao' => 'CRM_Contribute_BAO_ContributionPage',
698 'name' => 'max_amount',
699 'type' => CRM_Utils_Type
::T_MONEY
,
700 'title' => ts('Maximum Amount'),
701 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
706 'where' => 'civicrm_contribution_page.max_amount',
707 'table_name' => 'civicrm_contribution_page',
708 'entity' => 'ContributionPage',
709 'bao' => 'CRM_Contribute_BAO_ContributionPage',
713 'name' => 'goal_amount',
714 'type' => CRM_Utils_Type
::T_MONEY
,
715 'title' => ts('Goal Amount'),
716 'description' => ts('The target goal for this page, allows people to build a goal meter'),
721 'where' => 'civicrm_contribution_page.goal_amount',
722 'table_name' => 'civicrm_contribution_page',
723 'entity' => 'ContributionPage',
724 'bao' => 'CRM_Contribute_BAO_ContributionPage',
727 'thankyou_title' => [
728 'name' => 'thankyou_title',
729 'type' => CRM_Utils_Type
::T_STRING
,
730 'title' => ts('Thank-you Title'),
731 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
733 'size' => CRM_Utils_Type
::HUGE
,
734 'where' => 'civicrm_contribution_page.thankyou_title',
735 'table_name' => 'civicrm_contribution_page',
736 'entity' => 'ContributionPage',
737 'bao' => 'CRM_Contribute_BAO_ContributionPage',
741 'name' => 'thankyou_text',
742 'type' => CRM_Utils_Type
::T_TEXT
,
743 'title' => ts('Thank-you Text'),
744 'description' => ts('text and html allowed. displayed above result on success page'),
747 'where' => 'civicrm_contribution_page.thankyou_text',
748 'table_name' => 'civicrm_contribution_page',
749 'entity' => 'ContributionPage',
750 'bao' => 'CRM_Contribute_BAO_ContributionPage',
753 'type' => 'RichTextEditor',
756 'thankyou_footer' => [
757 'name' => 'thankyou_footer',
758 'type' => CRM_Utils_Type
::T_TEXT
,
759 'title' => ts('Thank-you Footer'),
760 '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.'),
763 'where' => 'civicrm_contribution_page.thankyou_footer',
764 'table_name' => 'civicrm_contribution_page',
765 'entity' => 'ContributionPage',
766 'bao' => 'CRM_Contribute_BAO_ContributionPage',
769 'type' => 'RichTextEditor',
772 'is_email_receipt' => [
773 'name' => 'is_email_receipt',
774 'type' => CRM_Utils_Type
::T_BOOLEAN
,
775 'title' => ts('Send email Receipt'),
776 'description' => ts('if true, receipt is automatically emailed to contact on success'),
777 'where' => 'civicrm_contribution_page.is_email_receipt',
779 'table_name' => 'civicrm_contribution_page',
780 'entity' => 'ContributionPage',
781 'bao' => 'CRM_Contribute_BAO_ContributionPage',
784 'receipt_from_name' => [
785 'name' => 'receipt_from_name',
786 'type' => CRM_Utils_Type
::T_STRING
,
787 'title' => ts('Receipt From'),
788 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
790 'size' => CRM_Utils_Type
::HUGE
,
791 'where' => 'civicrm_contribution_page.receipt_from_name',
792 'table_name' => 'civicrm_contribution_page',
793 'entity' => 'ContributionPage',
794 'bao' => 'CRM_Contribute_BAO_ContributionPage',
797 'receipt_from_email' => [
798 'name' => 'receipt_from_email',
799 'type' => CRM_Utils_Type
::T_STRING
,
800 'title' => ts('Receipt From email'),
801 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
803 'size' => CRM_Utils_Type
::HUGE
,
804 'where' => 'civicrm_contribution_page.receipt_from_email',
805 'table_name' => 'civicrm_contribution_page',
806 'entity' => 'ContributionPage',
807 'bao' => 'CRM_Contribute_BAO_ContributionPage',
811 'name' => 'cc_receipt',
812 'type' => CRM_Utils_Type
::T_STRING
,
813 'title' => ts('Receipt cc'),
814 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
816 'size' => CRM_Utils_Type
::HUGE
,
817 'where' => 'civicrm_contribution_page.cc_receipt',
818 'table_name' => 'civicrm_contribution_page',
819 'entity' => 'ContributionPage',
820 'bao' => 'CRM_Contribute_BAO_ContributionPage',
824 'name' => 'bcc_receipt',
825 'type' => CRM_Utils_Type
::T_STRING
,
826 'title' => ts('Receipt bcc'),
827 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
829 'size' => CRM_Utils_Type
::HUGE
,
830 'where' => 'civicrm_contribution_page.bcc_receipt',
831 'table_name' => 'civicrm_contribution_page',
832 'entity' => 'ContributionPage',
833 'bao' => 'CRM_Contribute_BAO_ContributionPage',
837 'name' => 'receipt_text',
838 'type' => CRM_Utils_Type
::T_TEXT
,
839 'title' => ts('Receipt Text'),
840 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'),
843 'where' => 'civicrm_contribution_page.receipt_text',
844 'table_name' => 'civicrm_contribution_page',
845 'entity' => 'ContributionPage',
846 'bao' => 'CRM_Contribute_BAO_ContributionPage',
849 'type' => 'TextArea',
853 'name' => 'is_active',
854 'type' => CRM_Utils_Type
::T_BOOLEAN
,
855 'title' => ts('Is Page Active?'),
856 'description' => ts('Is this property active?'),
857 'where' => 'civicrm_contribution_page.is_active',
858 'table_name' => 'civicrm_contribution_page',
859 'entity' => 'ContributionPage',
860 'bao' => 'CRM_Contribute_BAO_ContributionPage',
864 'name' => 'footer_text',
865 'type' => CRM_Utils_Type
::T_TEXT
,
866 'title' => ts('Footer Text'),
867 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
870 'where' => 'civicrm_contribution_page.footer_text',
871 'table_name' => 'civicrm_contribution_page',
872 'entity' => 'ContributionPage',
873 'bao' => 'CRM_Contribute_BAO_ContributionPage',
876 'type' => 'RichTextEditor',
879 'amount_block_is_active' => [
880 'name' => 'amount_block_is_active',
881 'type' => CRM_Utils_Type
::T_BOOLEAN
,
882 'title' => ts('Is Amount Block Active?'),
883 'description' => ts('Is this property active?'),
884 'where' => 'civicrm_contribution_page.amount_block_is_active',
886 'table_name' => 'civicrm_contribution_page',
887 'entity' => 'ContributionPage',
888 'bao' => 'CRM_Contribute_BAO_ContributionPage',
892 'name' => 'start_date',
893 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
894 'title' => ts('Contribution Page Start Date'),
895 'description' => ts('Date and time that this page starts.'),
896 'where' => 'civicrm_contribution_page.start_date',
897 'table_name' => 'civicrm_contribution_page',
898 'entity' => 'ContributionPage',
899 'bao' => 'CRM_Contribute_BAO_ContributionPage',
903 'name' => 'end_date',
904 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
905 'title' => ts('Contribution Page End Date'),
906 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
907 'where' => 'civicrm_contribution_page.end_date',
908 'table_name' => 'civicrm_contribution_page',
909 'entity' => 'ContributionPage',
910 'bao' => 'CRM_Contribute_BAO_ContributionPage',
914 'name' => 'created_id',
915 'type' => CRM_Utils_Type
::T_INT
,
916 'title' => ts('Contribution Page Created By'),
917 'description' => ts('FK to civicrm_contact, who created this contribution page'),
918 'where' => 'civicrm_contribution_page.created_id',
919 'table_name' => 'civicrm_contribution_page',
920 'entity' => 'ContributionPage',
921 'bao' => 'CRM_Contribute_BAO_ContributionPage',
923 'FKClassName' => 'CRM_Contact_DAO_Contact',
926 'name' => 'created_date',
927 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
928 'title' => ts('Contribution Page Created Date'),
929 'description' => ts('Date and time that contribution page was created.'),
930 'where' => 'civicrm_contribution_page.created_date',
931 'table_name' => 'civicrm_contribution_page',
932 'entity' => 'ContributionPage',
933 'bao' => 'CRM_Contribute_BAO_ContributionPage',
937 'name' => 'currency',
938 'type' => CRM_Utils_Type
::T_STRING
,
939 'title' => ts('Contribution Page Currency'),
940 'description' => ts('3 character string, value from config setting or input via user.'),
942 'size' => CRM_Utils_Type
::FOUR
,
943 'where' => 'civicrm_contribution_page.currency',
944 'headerPattern' => '/cur(rency)?/i',
945 'dataPattern' => '/^[A-Z]{3}$/i',
947 'table_name' => 'civicrm_contribution_page',
948 'entity' => 'ContributionPage',
949 'bao' => 'CRM_Contribute_BAO_ContributionPage',
954 'pseudoconstant' => [
955 'table' => 'civicrm_currency',
956 'keyColumn' => 'name',
957 'labelColumn' => 'full_name',
958 'nameColumn' => 'name',
959 'abbrColumn' => 'symbol',
963 'name' => 'campaign_id',
964 'type' => CRM_Utils_Type
::T_INT
,
965 'title' => ts('Contribution Page Campaign ID'),
966 'description' => ts('The campaign for which we are collecting contributions with this page.'),
967 'where' => 'civicrm_contribution_page.campaign_id',
968 'table_name' => 'civicrm_contribution_page',
969 'entity' => 'ContributionPage',
970 'bao' => 'CRM_Contribute_BAO_ContributionPage',
972 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
973 'pseudoconstant' => [
974 'table' => 'civicrm_campaign',
976 'labelColumn' => 'title',
980 'name' => 'is_share',
981 'type' => CRM_Utils_Type
::T_BOOLEAN
,
982 'title' => ts('Is Contribution Page Shared?'),
983 'description' => ts('Can people share the contribution page through social media?'),
984 'where' => 'civicrm_contribution_page.is_share',
986 'table_name' => 'civicrm_contribution_page',
987 'entity' => 'ContributionPage',
988 'bao' => 'CRM_Contribute_BAO_ContributionPage',
991 'is_billing_required' => [
992 'name' => 'is_billing_required',
993 'type' => CRM_Utils_Type
::T_BOOLEAN
,
994 'title' => ts('Is billing block required'),
995 'description' => ts('if true - billing block is required for online contribution page'),
996 'where' => 'civicrm_contribution_page.is_billing_required',
998 'table_name' => 'civicrm_contribution_page',
999 'entity' => 'ContributionPage',
1000 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1003 'contribution_page_frontend_title' => [
1004 'name' => 'frontend_title',
1005 'type' => CRM_Utils_Type
::T_STRING
,
1006 'title' => ts('Public Title'),
1007 'description' => ts('Contribution Page Public title'),
1009 'size' => CRM_Utils_Type
::HUGE
,
1010 'where' => 'civicrm_contribution_page.frontend_title',
1011 'default' => 'NULL',
1012 'table_name' => 'civicrm_contribution_page',
1013 'entity' => 'ContributionPage',
1014 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1021 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1023 return Civi
::$statics[__CLASS__
]['fields'];
1027 * Return a mapping from field-name to the corresponding key (as used in fields()).
1030 * Array(string $name => string $uniqueName).
1032 public static function &fieldKeys() {
1033 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1034 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1036 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1040 * Returns the names of this table
1044 public static function getTableName() {
1045 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1049 * Returns if this table needs to be logged
1053 public function getLog() {
1058 * Returns the list of fields that can be imported
1060 * @param bool $prefix
1064 public static function &import($prefix = FALSE) {
1065 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1070 * Returns the list of fields that can be exported
1072 * @param bool $prefix
1076 public static function &export($prefix = FALSE) {
1077 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1082 * Returns the list of indices
1084 * @param bool $localize
1088 public static function indices($localize = TRUE) {
1090 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;