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:902bfa164280b9ba21a7cb5a38aceba8)
13 * Database access object for the ContributionPage entity.
15 class CRM_Contribute_DAO_ContributionPage
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '1.3';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_contribution_page';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = TRUE;
41 * Contribution Page title. For top of page display
48 * Text and html allowed. Displayed below title.
55 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
59 public $financial_type_id;
62 * Payment Processors configured for this contribution Page
66 public $payment_processor;
69 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
73 public $is_credit_card_only;
76 * if true - allows real-time monetary transactions otherwise non-monetary transactions
83 * if true - allows recurring contributions, valid only for PayPal_Standard
90 * if false, the confirm page in contribution pages gets skipped
94 public $is_confirm_enabled;
97 * Supported recurring frequency units.
101 public $recur_frequency_unit;
104 * if true - supports recurring intervals
108 public $is_recur_interval;
111 * if true - asks user for recurring installments
115 public $is_recur_installments;
118 * if true - user is able to adjust payment start date
122 public $adjust_recur_start_date;
125 * if true - allows the user to send payment directly to the org later
129 public $is_pay_later;
132 * The text displayed to the user in the main form
136 public $pay_later_text;
139 * The receipt sent to the user instead of the normal receipt text
143 public $pay_later_receipt;
146 * is partial payment enabled for this online contribution page
150 public $is_partial_payment;
153 * Initial amount label for partial payment
157 public $initial_amount_label;
160 * Initial amount help text for partial payment
164 public $initial_amount_help_text;
167 * Minimum initial amount for partial payment
171 public $min_initial_amount;
174 * if true, page will include an input text field where user can enter their own amount
178 public $is_allow_other_amount;
181 * FK to civicrm_option_value.
185 public $default_amount_id;
188 * if other amounts allowed, user can configure minimum allowed.
195 * if other amounts allowed, user can configure maximum allowed.
202 * The target goal for this page, allows people to build a goal meter
209 * Title for Thank-you page (header title tag, and display at the top of the page).
213 public $thankyou_title;
216 * text and html allowed. displayed above result on success page
220 public $thankyou_text;
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.
227 public $thankyou_footer;
230 * if true, receipt is automatically emailed to contact on success
234 public $is_email_receipt;
237 * FROM email name used for receipts generated by contributions to this contribution page.
241 public $receipt_from_name;
244 * FROM email address used for receipts generated by contributions to this contribution page.
248 public $receipt_from_email;
251 * comma-separated list of email addresses to cc each time a receipt is sent
258 * comma-separated list of email addresses to bcc each time a receipt is sent
265 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
269 public $receipt_text;
272 * Is this property active?
279 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
286 * Is this property active?
290 public $amount_block_is_active;
293 * Date and time that this page starts.
300 * Date and time that this page ends. May be NULL if no defined end date/time
307 * FK to civicrm_contact, who created this contribution page
314 * Date and time that contribution page was created.
318 public $created_date;
321 * 3 character string, value from config setting or input via user.
328 * The campaign for which we are collecting contributions with this page.
335 * Can people share the contribution page through social media?
342 * if true - billing block is required for online contribution page
346 public $is_billing_required;
349 * Contribution Page Public title
353 public $frontend_title;
358 public function __construct() {
359 $this->__table
= 'civicrm_contribution_page';
360 parent
::__construct();
364 * Returns localized title of this entity.
366 public static function getEntityTitle() {
367 return ts('Contribution Pages');
371 * Returns foreign keys and entity references.
374 * [CRM_Core_Reference_Interface]
376 public static function getReferenceColumns() {
377 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
378 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
379 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
380 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
381 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
382 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
384 return Civi
::$statics[__CLASS__
]['links'];
388 * Returns all the column names of this table
392 public static function &fields() {
393 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
394 Civi
::$statics[__CLASS__
]['fields'] = [
397 'type' => CRM_Utils_Type
::T_INT
,
398 'title' => ts('Contribution Page ID'),
399 'description' => ts('Contribution Id'),
401 'where' => 'civicrm_contribution_page.id',
402 'table_name' => 'civicrm_contribution_page',
403 'entity' => 'ContributionPage',
404 'bao' => 'CRM_Contribute_BAO_ContributionPage',
410 'type' => CRM_Utils_Type
::T_STRING
,
411 'title' => ts('Contribution Page Title'),
412 'description' => ts('Contribution Page title. For top of page display'),
414 'size' => CRM_Utils_Type
::HUGE
,
415 'where' => 'civicrm_contribution_page.title',
416 'table_name' => 'civicrm_contribution_page',
417 'entity' => 'ContributionPage',
418 'bao' => 'CRM_Contribute_BAO_ContributionPage',
423 'name' => 'intro_text',
424 'type' => CRM_Utils_Type
::T_TEXT
,
425 'title' => ts('Contribution Page Introduction Text'),
426 'description' => ts('Text and html allowed. Displayed below title.'),
429 'where' => 'civicrm_contribution_page.intro_text',
430 'table_name' => 'civicrm_contribution_page',
431 'entity' => 'ContributionPage',
432 'bao' => 'CRM_Contribute_BAO_ContributionPage',
435 'type' => 'RichTextEditor',
439 'financial_type_id' => [
440 'name' => 'financial_type_id',
441 'type' => CRM_Utils_Type
::T_INT
,
442 'title' => ts('Financial Type'),
443 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
444 'where' => 'civicrm_contribution_page.financial_type_id',
445 'table_name' => 'civicrm_contribution_page',
446 'entity' => 'ContributionPage',
447 'bao' => 'CRM_Contribute_BAO_ContributionPage',
449 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
453 'pseudoconstant' => [
454 'table' => 'civicrm_financial_type',
456 'labelColumn' => 'name',
460 'payment_processor' => [
461 'name' => 'payment_processor',
462 'type' => CRM_Utils_Type
::T_STRING
,
463 'title' => ts('Payment Processor'),
464 'description' => ts('Payment Processors configured for this contribution Page'),
466 'size' => CRM_Utils_Type
::HUGE
,
467 'where' => 'civicrm_contribution_page.payment_processor',
468 'table_name' => 'civicrm_contribution_page',
469 'entity' => 'ContributionPage',
470 'bao' => 'CRM_Contribute_BAO_ContributionPage',
472 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
476 'pseudoconstant' => [
477 'table' => 'civicrm_payment_processor',
479 'labelColumn' => 'name',
483 'is_credit_card_only' => [
484 'name' => 'is_credit_card_only',
485 'type' => CRM_Utils_Type
::T_BOOLEAN
,
486 'title' => ts('Is Credit Card Only?'),
487 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
488 'where' => 'civicrm_contribution_page.is_credit_card_only',
490 'table_name' => 'civicrm_contribution_page',
491 'entity' => 'ContributionPage',
492 'bao' => 'CRM_Contribute_BAO_ContributionPage',
497 'name' => 'is_monetary',
498 'type' => CRM_Utils_Type
::T_BOOLEAN
,
499 'title' => ts('Is Monetary'),
500 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
501 'where' => 'civicrm_contribution_page.is_monetary',
503 'table_name' => 'civicrm_contribution_page',
504 'entity' => 'ContributionPage',
505 'bao' => 'CRM_Contribute_BAO_ContributionPage',
510 'name' => 'is_recur',
511 'type' => CRM_Utils_Type
::T_BOOLEAN
,
512 'title' => ts('Is Recurring'),
513 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
514 'where' => 'civicrm_contribution_page.is_recur',
516 'table_name' => 'civicrm_contribution_page',
517 'entity' => 'ContributionPage',
518 'bao' => 'CRM_Contribute_BAO_ContributionPage',
522 'is_confirm_enabled' => [
523 'name' => 'is_confirm_enabled',
524 'type' => CRM_Utils_Type
::T_BOOLEAN
,
525 'title' => ts('Confirmation Page?'),
526 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
527 'where' => 'civicrm_contribution_page.is_confirm_enabled',
529 'table_name' => 'civicrm_contribution_page',
530 'entity' => 'ContributionPage',
531 'bao' => 'CRM_Contribute_BAO_ContributionPage',
535 'recur_frequency_unit' => [
536 'name' => 'recur_frequency_unit',
537 'type' => CRM_Utils_Type
::T_STRING
,
538 'title' => ts('Recurring Frequency'),
539 'description' => ts('Supported recurring frequency units.'),
541 'size' => CRM_Utils_Type
::HUGE
,
542 'where' => 'civicrm_contribution_page.recur_frequency_unit',
543 'table_name' => 'civicrm_contribution_page',
544 'entity' => 'ContributionPage',
545 'bao' => 'CRM_Contribute_BAO_ContributionPage',
547 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
551 'pseudoconstant' => [
552 'optionGroupName' => 'recur_frequency_units',
553 'keyColumn' => 'name',
554 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
558 'is_recur_interval' => [
559 'name' => 'is_recur_interval',
560 'type' => CRM_Utils_Type
::T_BOOLEAN
,
561 'title' => ts('Support Recurring Intervals'),
562 'description' => ts('if true - supports recurring intervals'),
563 'where' => 'civicrm_contribution_page.is_recur_interval',
565 'table_name' => 'civicrm_contribution_page',
566 'entity' => 'ContributionPage',
567 'bao' => 'CRM_Contribute_BAO_ContributionPage',
571 'is_recur_installments' => [
572 'name' => 'is_recur_installments',
573 'type' => CRM_Utils_Type
::T_BOOLEAN
,
574 'title' => ts('Recurring Installments?'),
575 'description' => ts('if true - asks user for recurring installments'),
576 'where' => 'civicrm_contribution_page.is_recur_installments',
578 'table_name' => 'civicrm_contribution_page',
579 'entity' => 'ContributionPage',
580 'bao' => 'CRM_Contribute_BAO_ContributionPage',
584 'adjust_recur_start_date' => [
585 'name' => 'adjust_recur_start_date',
586 'type' => CRM_Utils_Type
::T_BOOLEAN
,
587 'title' => ts('Adjust Recurring Start Date'),
588 'description' => ts('if true - user is able to adjust payment start date'),
589 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
591 'table_name' => 'civicrm_contribution_page',
592 'entity' => 'ContributionPage',
593 'bao' => 'CRM_Contribute_BAO_ContributionPage',
598 'name' => 'is_pay_later',
599 'type' => CRM_Utils_Type
::T_BOOLEAN
,
600 'title' => ts('Pay Later'),
601 'description' => ts('if true - allows the user to send payment directly to the org later'),
602 'where' => 'civicrm_contribution_page.is_pay_later',
604 'table_name' => 'civicrm_contribution_page',
605 'entity' => 'ContributionPage',
606 'bao' => 'CRM_Contribute_BAO_ContributionPage',
610 'pay_later_text' => [
611 'name' => 'pay_later_text',
612 'type' => CRM_Utils_Type
::T_TEXT
,
613 'title' => ts('Pay Later Text'),
614 'description' => ts('The text displayed to the user in the main form'),
615 'where' => 'civicrm_contribution_page.pay_later_text',
616 'table_name' => 'civicrm_contribution_page',
617 'entity' => 'ContributionPage',
618 'bao' => 'CRM_Contribute_BAO_ContributionPage',
622 'pay_later_receipt' => [
623 'name' => 'pay_later_receipt',
624 'type' => CRM_Utils_Type
::T_TEXT
,
625 'title' => ts('Pay Later Receipt'),
626 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
627 'where' => 'civicrm_contribution_page.pay_later_receipt',
628 'table_name' => 'civicrm_contribution_page',
629 'entity' => 'ContributionPage',
630 'bao' => 'CRM_Contribute_BAO_ContributionPage',
634 'is_partial_payment' => [
635 'name' => 'is_partial_payment',
636 'type' => CRM_Utils_Type
::T_BOOLEAN
,
637 'title' => ts('Allow Partial Payment'),
638 'description' => ts('is partial payment enabled for this online contribution page'),
639 'where' => 'civicrm_contribution_page.is_partial_payment',
641 'table_name' => 'civicrm_contribution_page',
642 'entity' => 'ContributionPage',
643 'bao' => 'CRM_Contribute_BAO_ContributionPage',
647 'initial_amount_label' => [
648 'name' => 'initial_amount_label',
649 'type' => CRM_Utils_Type
::T_STRING
,
650 'title' => ts('Initial Amount Label'),
651 'description' => ts('Initial amount label for partial payment'),
653 'size' => CRM_Utils_Type
::HUGE
,
654 'where' => 'civicrm_contribution_page.initial_amount_label',
655 'table_name' => 'civicrm_contribution_page',
656 'entity' => 'ContributionPage',
657 'bao' => 'CRM_Contribute_BAO_ContributionPage',
661 'initial_amount_help_text' => [
662 'name' => 'initial_amount_help_text',
663 'type' => CRM_Utils_Type
::T_TEXT
,
664 'title' => ts('Initial Amount Help Text'),
665 'description' => ts('Initial amount help text for partial payment'),
666 'where' => 'civicrm_contribution_page.initial_amount_help_text',
667 'table_name' => 'civicrm_contribution_page',
668 'entity' => 'ContributionPage',
669 'bao' => 'CRM_Contribute_BAO_ContributionPage',
673 'min_initial_amount' => [
674 'name' => 'min_initial_amount',
675 'type' => CRM_Utils_Type
::T_MONEY
,
676 'title' => ts('Min Initial Amount'),
677 'description' => ts('Minimum initial amount for partial payment'),
682 'where' => 'civicrm_contribution_page.min_initial_amount',
683 'table_name' => 'civicrm_contribution_page',
684 'entity' => 'ContributionPage',
685 'bao' => 'CRM_Contribute_BAO_ContributionPage',
689 'is_allow_other_amount' => [
690 'name' => 'is_allow_other_amount',
691 'type' => CRM_Utils_Type
::T_BOOLEAN
,
692 'title' => ts('Allow Other Amounts'),
693 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
694 'where' => 'civicrm_contribution_page.is_allow_other_amount',
696 'table_name' => 'civicrm_contribution_page',
697 'entity' => 'ContributionPage',
698 'bao' => 'CRM_Contribute_BAO_ContributionPage',
702 'default_amount_id' => [
703 'name' => 'default_amount_id',
704 'type' => CRM_Utils_Type
::T_INT
,
705 'title' => ts('Default Amount'),
706 'description' => ts('FK to civicrm_option_value.'),
707 'where' => 'civicrm_contribution_page.default_amount_id',
708 'table_name' => 'civicrm_contribution_page',
709 'entity' => 'ContributionPage',
710 'bao' => 'CRM_Contribute_BAO_ContributionPage',
715 'name' => 'min_amount',
716 'type' => CRM_Utils_Type
::T_MONEY
,
717 'title' => ts('Minimum Amount'),
718 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
723 'where' => 'civicrm_contribution_page.min_amount',
724 'table_name' => 'civicrm_contribution_page',
725 'entity' => 'ContributionPage',
726 'bao' => 'CRM_Contribute_BAO_ContributionPage',
731 'name' => 'max_amount',
732 'type' => CRM_Utils_Type
::T_MONEY
,
733 'title' => ts('Maximum Amount'),
734 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
739 'where' => 'civicrm_contribution_page.max_amount',
740 'table_name' => 'civicrm_contribution_page',
741 'entity' => 'ContributionPage',
742 'bao' => 'CRM_Contribute_BAO_ContributionPage',
747 'name' => 'goal_amount',
748 'type' => CRM_Utils_Type
::T_MONEY
,
749 'title' => ts('Goal Amount'),
750 'description' => ts('The target goal for this page, allows people to build a goal meter'),
755 'where' => 'civicrm_contribution_page.goal_amount',
756 'table_name' => 'civicrm_contribution_page',
757 'entity' => 'ContributionPage',
758 'bao' => 'CRM_Contribute_BAO_ContributionPage',
762 'thankyou_title' => [
763 'name' => 'thankyou_title',
764 'type' => CRM_Utils_Type
::T_STRING
,
765 'title' => ts('Thank-you Title'),
766 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
768 'size' => CRM_Utils_Type
::HUGE
,
769 'where' => 'civicrm_contribution_page.thankyou_title',
770 'table_name' => 'civicrm_contribution_page',
771 'entity' => 'ContributionPage',
772 'bao' => 'CRM_Contribute_BAO_ContributionPage',
777 'name' => 'thankyou_text',
778 'type' => CRM_Utils_Type
::T_TEXT
,
779 'title' => ts('Thank-you Text'),
780 'description' => ts('text and html allowed. displayed above result on success page'),
783 'where' => 'civicrm_contribution_page.thankyou_text',
784 'table_name' => 'civicrm_contribution_page',
785 'entity' => 'ContributionPage',
786 'bao' => 'CRM_Contribute_BAO_ContributionPage',
789 'type' => 'RichTextEditor',
793 'thankyou_footer' => [
794 'name' => 'thankyou_footer',
795 'type' => CRM_Utils_Type
::T_TEXT
,
796 'title' => ts('Thank-you Footer'),
797 '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.'),
800 'where' => 'civicrm_contribution_page.thankyou_footer',
801 'table_name' => 'civicrm_contribution_page',
802 'entity' => 'ContributionPage',
803 'bao' => 'CRM_Contribute_BAO_ContributionPage',
806 'type' => 'RichTextEditor',
810 'is_email_receipt' => [
811 'name' => 'is_email_receipt',
812 'type' => CRM_Utils_Type
::T_BOOLEAN
,
813 'title' => ts('Send email Receipt'),
814 'description' => ts('if true, receipt is automatically emailed to contact on success'),
815 'where' => 'civicrm_contribution_page.is_email_receipt',
817 'table_name' => 'civicrm_contribution_page',
818 'entity' => 'ContributionPage',
819 'bao' => 'CRM_Contribute_BAO_ContributionPage',
823 'receipt_from_name' => [
824 'name' => 'receipt_from_name',
825 'type' => CRM_Utils_Type
::T_STRING
,
826 'title' => ts('Receipt From'),
827 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
829 'size' => CRM_Utils_Type
::HUGE
,
830 'where' => 'civicrm_contribution_page.receipt_from_name',
831 'table_name' => 'civicrm_contribution_page',
832 'entity' => 'ContributionPage',
833 'bao' => 'CRM_Contribute_BAO_ContributionPage',
837 'receipt_from_email' => [
838 'name' => 'receipt_from_email',
839 'type' => CRM_Utils_Type
::T_STRING
,
840 'title' => ts('Receipt From email'),
841 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
843 'size' => CRM_Utils_Type
::HUGE
,
844 'where' => 'civicrm_contribution_page.receipt_from_email',
845 'table_name' => 'civicrm_contribution_page',
846 'entity' => 'ContributionPage',
847 'bao' => 'CRM_Contribute_BAO_ContributionPage',
852 'name' => 'cc_receipt',
853 'type' => CRM_Utils_Type
::T_STRING
,
854 'title' => ts('Receipt cc'),
855 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
857 'size' => CRM_Utils_Type
::HUGE
,
858 'where' => 'civicrm_contribution_page.cc_receipt',
859 'table_name' => 'civicrm_contribution_page',
860 'entity' => 'ContributionPage',
861 'bao' => 'CRM_Contribute_BAO_ContributionPage',
866 'name' => 'bcc_receipt',
867 'type' => CRM_Utils_Type
::T_STRING
,
868 'title' => ts('Receipt bcc'),
869 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
871 'size' => CRM_Utils_Type
::HUGE
,
872 'where' => 'civicrm_contribution_page.bcc_receipt',
873 'table_name' => 'civicrm_contribution_page',
874 'entity' => 'ContributionPage',
875 'bao' => 'CRM_Contribute_BAO_ContributionPage',
880 'name' => 'receipt_text',
881 'type' => CRM_Utils_Type
::T_TEXT
,
882 'title' => ts('Receipt Text'),
883 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'),
886 'where' => 'civicrm_contribution_page.receipt_text',
887 'table_name' => 'civicrm_contribution_page',
888 'entity' => 'ContributionPage',
889 'bao' => 'CRM_Contribute_BAO_ContributionPage',
892 'type' => 'TextArea',
897 'name' => 'is_active',
898 'type' => CRM_Utils_Type
::T_BOOLEAN
,
899 'title' => ts('Is Page Active?'),
900 'description' => ts('Is this property active?'),
901 'where' => 'civicrm_contribution_page.is_active',
902 'table_name' => 'civicrm_contribution_page',
903 'entity' => 'ContributionPage',
904 'bao' => 'CRM_Contribute_BAO_ContributionPage',
909 'name' => 'footer_text',
910 'type' => CRM_Utils_Type
::T_TEXT
,
911 'title' => ts('Footer Text'),
912 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
915 'where' => 'civicrm_contribution_page.footer_text',
916 'table_name' => 'civicrm_contribution_page',
917 'entity' => 'ContributionPage',
918 'bao' => 'CRM_Contribute_BAO_ContributionPage',
921 'type' => 'RichTextEditor',
925 'amount_block_is_active' => [
926 'name' => 'amount_block_is_active',
927 'type' => CRM_Utils_Type
::T_BOOLEAN
,
928 'title' => ts('Is Amount Block Active?'),
929 'description' => ts('Is this property active?'),
930 'where' => 'civicrm_contribution_page.amount_block_is_active',
932 'table_name' => 'civicrm_contribution_page',
933 'entity' => 'ContributionPage',
934 'bao' => 'CRM_Contribute_BAO_ContributionPage',
939 'name' => 'start_date',
940 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
941 'title' => ts('Contribution Page Start Date'),
942 'description' => ts('Date and time that this page starts.'),
943 'where' => 'civicrm_contribution_page.start_date',
944 'table_name' => 'civicrm_contribution_page',
945 'entity' => 'ContributionPage',
946 'bao' => 'CRM_Contribute_BAO_ContributionPage',
951 'name' => 'end_date',
952 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
953 'title' => ts('Contribution Page End Date'),
954 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
955 'where' => 'civicrm_contribution_page.end_date',
956 'table_name' => 'civicrm_contribution_page',
957 'entity' => 'ContributionPage',
958 'bao' => 'CRM_Contribute_BAO_ContributionPage',
963 'name' => 'created_id',
964 'type' => CRM_Utils_Type
::T_INT
,
965 'title' => ts('Contribution Page Created By'),
966 'description' => ts('FK to civicrm_contact, who created this contribution page'),
967 'where' => 'civicrm_contribution_page.created_id',
968 'table_name' => 'civicrm_contribution_page',
969 'entity' => 'ContributionPage',
970 'bao' => 'CRM_Contribute_BAO_ContributionPage',
972 'FKClassName' => 'CRM_Contact_DAO_Contact',
976 'name' => 'created_date',
977 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
978 'title' => ts('Contribution Page Created Date'),
979 'description' => ts('Date and time that contribution page was created.'),
980 'where' => 'civicrm_contribution_page.created_date',
981 'table_name' => 'civicrm_contribution_page',
982 'entity' => 'ContributionPage',
983 'bao' => 'CRM_Contribute_BAO_ContributionPage',
988 'name' => 'currency',
989 'type' => CRM_Utils_Type
::T_STRING
,
990 'title' => ts('Contribution Page Currency'),
991 'description' => ts('3 character string, value from config setting or input via user.'),
993 'size' => CRM_Utils_Type
::FOUR
,
994 'where' => 'civicrm_contribution_page.currency',
995 'headerPattern' => '/cur(rency)?/i',
996 'dataPattern' => '/^[A-Z]{3}$/i',
998 'table_name' => 'civicrm_contribution_page',
999 'entity' => 'ContributionPage',
1000 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1005 'pseudoconstant' => [
1006 'table' => 'civicrm_currency',
1007 'keyColumn' => 'name',
1008 'labelColumn' => 'full_name',
1009 'nameColumn' => 'name',
1010 'abbrColumn' => 'symbol',
1015 'name' => 'campaign_id',
1016 'type' => CRM_Utils_Type
::T_INT
,
1017 'title' => ts('Contribution Page Campaign ID'),
1018 'description' => ts('The campaign for which we are collecting contributions with this page.'),
1019 'where' => 'civicrm_contribution_page.campaign_id',
1020 'table_name' => 'civicrm_contribution_page',
1021 'entity' => 'ContributionPage',
1022 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1024 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1025 'pseudoconstant' => [
1026 'table' => 'civicrm_campaign',
1027 'keyColumn' => 'id',
1028 'labelColumn' => 'title',
1033 'name' => 'is_share',
1034 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1035 'title' => ts('Is Contribution Page Shared?'),
1036 'description' => ts('Can people share the contribution page through social media?'),
1037 'where' => 'civicrm_contribution_page.is_share',
1039 'table_name' => 'civicrm_contribution_page',
1040 'entity' => 'ContributionPage',
1041 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1045 'is_billing_required' => [
1046 'name' => 'is_billing_required',
1047 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1048 'title' => ts('Is billing block required'),
1049 'description' => ts('if true - billing block is required for online contribution page'),
1050 'where' => 'civicrm_contribution_page.is_billing_required',
1052 'table_name' => 'civicrm_contribution_page',
1053 'entity' => 'ContributionPage',
1054 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1058 'contribution_page_frontend_title' => [
1059 'name' => 'frontend_title',
1060 'type' => CRM_Utils_Type
::T_STRING
,
1061 'title' => ts('Public Title'),
1062 'description' => ts('Contribution Page Public title'),
1064 'size' => CRM_Utils_Type
::HUGE
,
1065 'where' => 'civicrm_contribution_page.frontend_title',
1066 'default' => 'NULL',
1067 'table_name' => 'civicrm_contribution_page',
1068 'entity' => 'ContributionPage',
1069 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1077 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1079 return Civi
::$statics[__CLASS__
]['fields'];
1083 * Return a mapping from field-name to the corresponding key (as used in fields()).
1086 * Array(string $name => string $uniqueName).
1088 public static function &fieldKeys() {
1089 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1090 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1092 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1096 * Returns the names of this table
1100 public static function getTableName() {
1101 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1105 * Returns if this table needs to be logged
1109 public function getLog() {
1114 * Returns the list of fields that can be imported
1116 * @param bool $prefix
1120 public static function &import($prefix = FALSE) {
1121 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1126 * Returns the list of fields that can be exported
1128 * @param bool $prefix
1132 public static function &export($prefix = FALSE) {
1133 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1138 * Returns the list of indices
1140 * @param bool $localize
1144 public static function indices($localize = TRUE) {
1146 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;