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:7184516d11bf5c76f3f2604202b81cbf)
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';
18 const COMPONENT
= 'CiviContribute';
21 * Static instance to hold the table name.
25 public static $_tableName = 'civicrm_contribution_page';
28 * Field to show when displaying a record.
32 public static $_labelField = 'title';
35 * Should CiviCRM log any modifications to this table in the civicrm_log table.
39 public static $_log = TRUE;
49 * Contribution Page title. For top of page display
56 * Text and html allowed. Displayed below title.
63 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
67 public $financial_type_id;
70 * Payment Processors configured for this contribution Page
74 public $payment_processor;
77 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
81 public $is_credit_card_only;
84 * if true - allows real-time monetary transactions otherwise non-monetary transactions
91 * if true - allows recurring contributions, valid only for PayPal_Standard
98 * if false, the confirm page in contribution pages gets skipped
102 public $is_confirm_enabled;
105 * Supported recurring frequency units.
109 public $recur_frequency_unit;
112 * if true - supports recurring intervals
116 public $is_recur_interval;
119 * if true - asks user for recurring installments
123 public $is_recur_installments;
126 * if true - user is able to adjust payment start date
130 public $adjust_recur_start_date;
133 * if true - allows the user to send payment directly to the org later
137 public $is_pay_later;
140 * The text displayed to the user in the main form
144 public $pay_later_text;
147 * The receipt sent to the user instead of the normal receipt text
151 public $pay_later_receipt;
154 * is partial payment enabled for this online contribution page
158 public $is_partial_payment;
161 * Initial amount label for partial payment
165 public $initial_amount_label;
168 * Initial amount help text for partial payment
172 public $initial_amount_help_text;
175 * Minimum initial amount for partial payment
179 public $min_initial_amount;
182 * if true, page will include an input text field where user can enter their own amount
186 public $is_allow_other_amount;
189 * FK to civicrm_option_value.
193 public $default_amount_id;
196 * if other amounts allowed, user can configure minimum allowed.
203 * if other amounts allowed, user can configure maximum allowed.
210 * The target goal for this page, allows people to build a goal meter
217 * Title for Thank-you page (header title tag, and display at the top of the page).
221 public $thankyou_title;
224 * text and html allowed. displayed above result on success page
228 public $thankyou_text;
231 * 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.
235 public $thankyou_footer;
238 * if true, receipt is automatically emailed to contact on success
242 public $is_email_receipt;
245 * FROM email name used for receipts generated by contributions to this contribution page.
249 public $receipt_from_name;
252 * FROM email address used for receipts generated by contributions to this contribution page.
256 public $receipt_from_email;
259 * comma-separated list of email addresses to cc each time a receipt is sent
266 * comma-separated list of email addresses to bcc each time a receipt is sent
273 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
277 public $receipt_text;
280 * Is this property active?
287 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
294 * Is this property active?
298 public $amount_block_is_active;
301 * Date and time that this page starts.
308 * Date and time that this page ends. May be NULL if no defined end date/time
315 * FK to civicrm_contact, who created this contribution page
322 * Date and time that contribution page was created.
326 public $created_date;
329 * 3 character string, value from config setting or input via user.
336 * The campaign for which we are collecting contributions with this page.
343 * Can people share the contribution page through social media?
350 * if true - billing block is required for online contribution page
354 public $is_billing_required;
357 * Contribution Page Public title
361 public $frontend_title;
366 public function __construct() {
367 $this->__table
= 'civicrm_contribution_page';
368 parent
::__construct();
372 * Returns localized title of this entity.
374 * @param bool $plural
375 * Whether to return the plural version of the title.
377 public static function getEntityTitle($plural = FALSE) {
378 return $plural ?
ts('Contribution Pages') : ts('Contribution Page');
382 * Returns foreign keys and entity references.
385 * [CRM_Core_Reference_Interface]
387 public static function getReferenceColumns() {
388 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
389 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
390 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
391 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
392 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
393 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
395 return Civi
::$statics[__CLASS__
]['links'];
399 * Returns all the column names of this table
403 public static function &fields() {
404 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
405 Civi
::$statics[__CLASS__
]['fields'] = [
408 'type' => CRM_Utils_Type
::T_INT
,
409 'title' => ts('Contribution Page ID'),
410 'description' => ts('Contribution ID'),
412 'where' => 'civicrm_contribution_page.id',
413 'table_name' => 'civicrm_contribution_page',
414 'entity' => 'ContributionPage',
415 'bao' => 'CRM_Contribute_BAO_ContributionPage',
424 'type' => CRM_Utils_Type
::T_STRING
,
425 'title' => ts('Contribution Page Title'),
426 'description' => ts('Contribution Page title. For top of page display'),
428 'size' => CRM_Utils_Type
::HUGE
,
429 'where' => 'civicrm_contribution_page.title',
430 'table_name' => 'civicrm_contribution_page',
431 'entity' => 'ContributionPage',
432 'bao' => 'CRM_Contribute_BAO_ContributionPage',
437 'name' => 'intro_text',
438 'type' => CRM_Utils_Type
::T_TEXT
,
439 'title' => ts('Contribution Page Introduction Text'),
440 'description' => ts('Text and html allowed. Displayed below title.'),
443 'where' => 'civicrm_contribution_page.intro_text',
444 'table_name' => 'civicrm_contribution_page',
445 'entity' => 'ContributionPage',
446 'bao' => 'CRM_Contribute_BAO_ContributionPage',
449 'type' => 'RichTextEditor',
453 'financial_type_id' => [
454 'name' => 'financial_type_id',
455 'type' => CRM_Utils_Type
::T_INT
,
456 'title' => ts('Financial Type ID'),
457 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
458 'where' => 'civicrm_contribution_page.financial_type_id',
459 'table_name' => 'civicrm_contribution_page',
460 'entity' => 'ContributionPage',
461 'bao' => 'CRM_Contribute_BAO_ContributionPage',
463 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
467 'pseudoconstant' => [
468 'table' => 'civicrm_financial_type',
470 'labelColumn' => 'name',
474 'payment_processor' => [
475 'name' => 'payment_processor',
476 'type' => CRM_Utils_Type
::T_STRING
,
477 'title' => ts('Payment Processor'),
478 'description' => ts('Payment Processors configured for this contribution Page'),
480 'size' => CRM_Utils_Type
::HUGE
,
481 'where' => 'civicrm_contribution_page.payment_processor',
482 'table_name' => 'civicrm_contribution_page',
483 'entity' => 'ContributionPage',
484 'bao' => 'CRM_Contribute_BAO_ContributionPage',
486 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
490 'pseudoconstant' => [
491 'table' => 'civicrm_payment_processor',
493 'labelColumn' => 'name',
497 'is_credit_card_only' => [
498 'name' => 'is_credit_card_only',
499 'type' => CRM_Utils_Type
::T_BOOLEAN
,
500 'title' => ts('Is Credit Card Only?'),
501 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
502 'where' => 'civicrm_contribution_page.is_credit_card_only',
504 'table_name' => 'civicrm_contribution_page',
505 'entity' => 'ContributionPage',
506 'bao' => 'CRM_Contribute_BAO_ContributionPage',
511 'name' => 'is_monetary',
512 'type' => CRM_Utils_Type
::T_BOOLEAN
,
513 'title' => ts('Is Monetary'),
514 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
515 'where' => 'civicrm_contribution_page.is_monetary',
517 'table_name' => 'civicrm_contribution_page',
518 'entity' => 'ContributionPage',
519 'bao' => 'CRM_Contribute_BAO_ContributionPage',
524 'name' => 'is_recur',
525 'type' => CRM_Utils_Type
::T_BOOLEAN
,
526 'title' => ts('Is Recurring'),
527 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
528 'where' => 'civicrm_contribution_page.is_recur',
530 'table_name' => 'civicrm_contribution_page',
531 'entity' => 'ContributionPage',
532 'bao' => 'CRM_Contribute_BAO_ContributionPage',
536 'is_confirm_enabled' => [
537 'name' => 'is_confirm_enabled',
538 'type' => CRM_Utils_Type
::T_BOOLEAN
,
539 'title' => ts('Confirmation Page?'),
540 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
541 'where' => 'civicrm_contribution_page.is_confirm_enabled',
543 'table_name' => 'civicrm_contribution_page',
544 'entity' => 'ContributionPage',
545 'bao' => 'CRM_Contribute_BAO_ContributionPage',
549 'recur_frequency_unit' => [
550 'name' => 'recur_frequency_unit',
551 'type' => CRM_Utils_Type
::T_STRING
,
552 'title' => ts('Recurring Frequency'),
553 'description' => ts('Supported recurring frequency units.'),
555 'size' => CRM_Utils_Type
::HUGE
,
556 'where' => 'civicrm_contribution_page.recur_frequency_unit',
557 'table_name' => 'civicrm_contribution_page',
558 'entity' => 'ContributionPage',
559 'bao' => 'CRM_Contribute_BAO_ContributionPage',
561 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
565 'pseudoconstant' => [
566 'optionGroupName' => 'recur_frequency_units',
567 'keyColumn' => 'name',
568 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
572 'is_recur_interval' => [
573 'name' => 'is_recur_interval',
574 'type' => CRM_Utils_Type
::T_BOOLEAN
,
575 'title' => ts('Support Recurring Intervals'),
576 'description' => ts('if true - supports recurring intervals'),
577 'where' => 'civicrm_contribution_page.is_recur_interval',
579 'table_name' => 'civicrm_contribution_page',
580 'entity' => 'ContributionPage',
581 'bao' => 'CRM_Contribute_BAO_ContributionPage',
585 'is_recur_installments' => [
586 'name' => 'is_recur_installments',
587 'type' => CRM_Utils_Type
::T_BOOLEAN
,
588 'title' => ts('Recurring Installments?'),
589 'description' => ts('if true - asks user for recurring installments'),
590 'where' => 'civicrm_contribution_page.is_recur_installments',
592 'table_name' => 'civicrm_contribution_page',
593 'entity' => 'ContributionPage',
594 'bao' => 'CRM_Contribute_BAO_ContributionPage',
598 'adjust_recur_start_date' => [
599 'name' => 'adjust_recur_start_date',
600 'type' => CRM_Utils_Type
::T_BOOLEAN
,
601 'title' => ts('Adjust Recurring Start Date'),
602 'description' => ts('if true - user is able to adjust payment start date'),
603 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
605 'table_name' => 'civicrm_contribution_page',
606 'entity' => 'ContributionPage',
607 'bao' => 'CRM_Contribute_BAO_ContributionPage',
612 'name' => 'is_pay_later',
613 'type' => CRM_Utils_Type
::T_BOOLEAN
,
614 'title' => ts('Pay Later'),
615 'description' => ts('if true - allows the user to send payment directly to the org later'),
616 'where' => 'civicrm_contribution_page.is_pay_later',
618 'table_name' => 'civicrm_contribution_page',
619 'entity' => 'ContributionPage',
620 'bao' => 'CRM_Contribute_BAO_ContributionPage',
624 'pay_later_text' => [
625 'name' => 'pay_later_text',
626 'type' => CRM_Utils_Type
::T_TEXT
,
627 'title' => ts('Pay Later Text'),
628 'description' => ts('The text displayed to the user in the main form'),
629 'where' => 'civicrm_contribution_page.pay_later_text',
630 'table_name' => 'civicrm_contribution_page',
631 'entity' => 'ContributionPage',
632 'bao' => 'CRM_Contribute_BAO_ContributionPage',
636 'pay_later_receipt' => [
637 'name' => 'pay_later_receipt',
638 'type' => CRM_Utils_Type
::T_TEXT
,
639 'title' => ts('Pay Later Receipt'),
640 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
641 'where' => 'civicrm_contribution_page.pay_later_receipt',
642 'table_name' => 'civicrm_contribution_page',
643 'entity' => 'ContributionPage',
644 'bao' => 'CRM_Contribute_BAO_ContributionPage',
648 'is_partial_payment' => [
649 'name' => 'is_partial_payment',
650 'type' => CRM_Utils_Type
::T_BOOLEAN
,
651 'title' => ts('Allow Partial Payment'),
652 'description' => ts('is partial payment enabled for this online contribution page'),
653 'where' => 'civicrm_contribution_page.is_partial_payment',
655 'table_name' => 'civicrm_contribution_page',
656 'entity' => 'ContributionPage',
657 'bao' => 'CRM_Contribute_BAO_ContributionPage',
661 'initial_amount_label' => [
662 'name' => 'initial_amount_label',
663 'type' => CRM_Utils_Type
::T_STRING
,
664 'title' => ts('Initial Amount Label'),
665 'description' => ts('Initial amount label for partial payment'),
667 'size' => CRM_Utils_Type
::HUGE
,
668 'where' => 'civicrm_contribution_page.initial_amount_label',
669 'table_name' => 'civicrm_contribution_page',
670 'entity' => 'ContributionPage',
671 'bao' => 'CRM_Contribute_BAO_ContributionPage',
675 'initial_amount_help_text' => [
676 'name' => 'initial_amount_help_text',
677 'type' => CRM_Utils_Type
::T_TEXT
,
678 'title' => ts('Initial Amount Help Text'),
679 'description' => ts('Initial amount help text for partial payment'),
680 'where' => 'civicrm_contribution_page.initial_amount_help_text',
681 'table_name' => 'civicrm_contribution_page',
682 'entity' => 'ContributionPage',
683 'bao' => 'CRM_Contribute_BAO_ContributionPage',
687 'min_initial_amount' => [
688 'name' => 'min_initial_amount',
689 'type' => CRM_Utils_Type
::T_MONEY
,
690 'title' => ts('Min Initial Amount'),
691 'description' => ts('Minimum initial amount for partial payment'),
696 'where' => 'civicrm_contribution_page.min_initial_amount',
697 'table_name' => 'civicrm_contribution_page',
698 'entity' => 'ContributionPage',
699 'bao' => 'CRM_Contribute_BAO_ContributionPage',
703 'is_allow_other_amount' => [
704 'name' => 'is_allow_other_amount',
705 'type' => CRM_Utils_Type
::T_BOOLEAN
,
706 'title' => ts('Allow Other Amounts'),
707 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
708 'where' => 'civicrm_contribution_page.is_allow_other_amount',
710 'table_name' => 'civicrm_contribution_page',
711 'entity' => 'ContributionPage',
712 'bao' => 'CRM_Contribute_BAO_ContributionPage',
716 'default_amount_id' => [
717 'name' => 'default_amount_id',
718 'type' => CRM_Utils_Type
::T_INT
,
719 'title' => ts('Default Amount'),
720 'description' => ts('FK to civicrm_option_value.'),
721 'where' => 'civicrm_contribution_page.default_amount_id',
722 'table_name' => 'civicrm_contribution_page',
723 'entity' => 'ContributionPage',
724 'bao' => 'CRM_Contribute_BAO_ContributionPage',
729 'name' => 'min_amount',
730 'type' => CRM_Utils_Type
::T_MONEY
,
731 'title' => ts('Minimum Amount'),
732 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
737 'where' => 'civicrm_contribution_page.min_amount',
738 'table_name' => 'civicrm_contribution_page',
739 'entity' => 'ContributionPage',
740 'bao' => 'CRM_Contribute_BAO_ContributionPage',
745 'name' => 'max_amount',
746 'type' => CRM_Utils_Type
::T_MONEY
,
747 'title' => ts('Maximum Amount'),
748 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
753 'where' => 'civicrm_contribution_page.max_amount',
754 'table_name' => 'civicrm_contribution_page',
755 'entity' => 'ContributionPage',
756 'bao' => 'CRM_Contribute_BAO_ContributionPage',
761 'name' => 'goal_amount',
762 'type' => CRM_Utils_Type
::T_MONEY
,
763 'title' => ts('Goal Amount'),
764 'description' => ts('The target goal for this page, allows people to build a goal meter'),
769 'where' => 'civicrm_contribution_page.goal_amount',
770 'table_name' => 'civicrm_contribution_page',
771 'entity' => 'ContributionPage',
772 'bao' => 'CRM_Contribute_BAO_ContributionPage',
776 'thankyou_title' => [
777 'name' => 'thankyou_title',
778 'type' => CRM_Utils_Type
::T_STRING
,
779 'title' => ts('Thank-you Title'),
780 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
782 'size' => CRM_Utils_Type
::HUGE
,
783 'where' => 'civicrm_contribution_page.thankyou_title',
784 'table_name' => 'civicrm_contribution_page',
785 'entity' => 'ContributionPage',
786 'bao' => 'CRM_Contribute_BAO_ContributionPage',
791 'name' => 'thankyou_text',
792 'type' => CRM_Utils_Type
::T_TEXT
,
793 'title' => ts('Thank-you Text'),
794 'description' => ts('text and html allowed. displayed above result on success page'),
797 'where' => 'civicrm_contribution_page.thankyou_text',
798 'table_name' => 'civicrm_contribution_page',
799 'entity' => 'ContributionPage',
800 'bao' => 'CRM_Contribute_BAO_ContributionPage',
803 'type' => 'RichTextEditor',
807 'thankyou_footer' => [
808 'name' => 'thankyou_footer',
809 'type' => CRM_Utils_Type
::T_TEXT
,
810 'title' => ts('Thank-you Footer'),
811 '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.'),
814 'where' => 'civicrm_contribution_page.thankyou_footer',
815 'table_name' => 'civicrm_contribution_page',
816 'entity' => 'ContributionPage',
817 'bao' => 'CRM_Contribute_BAO_ContributionPage',
820 'type' => 'RichTextEditor',
824 'is_email_receipt' => [
825 'name' => 'is_email_receipt',
826 'type' => CRM_Utils_Type
::T_BOOLEAN
,
827 'title' => ts('Send email Receipt'),
828 'description' => ts('if true, receipt is automatically emailed to contact on success'),
829 'where' => 'civicrm_contribution_page.is_email_receipt',
831 'table_name' => 'civicrm_contribution_page',
832 'entity' => 'ContributionPage',
833 'bao' => 'CRM_Contribute_BAO_ContributionPage',
837 'receipt_from_name' => [
838 'name' => 'receipt_from_name',
839 'type' => CRM_Utils_Type
::T_STRING
,
840 'title' => ts('Receipt From'),
841 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
843 'size' => CRM_Utils_Type
::HUGE
,
844 'where' => 'civicrm_contribution_page.receipt_from_name',
845 'table_name' => 'civicrm_contribution_page',
846 'entity' => 'ContributionPage',
847 'bao' => 'CRM_Contribute_BAO_ContributionPage',
851 'receipt_from_email' => [
852 'name' => 'receipt_from_email',
853 'type' => CRM_Utils_Type
::T_STRING
,
854 'title' => ts('Receipt From email'),
855 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
857 'size' => CRM_Utils_Type
::HUGE
,
858 'where' => 'civicrm_contribution_page.receipt_from_email',
859 'table_name' => 'civicrm_contribution_page',
860 'entity' => 'ContributionPage',
861 'bao' => 'CRM_Contribute_BAO_ContributionPage',
866 'name' => 'cc_receipt',
867 'type' => CRM_Utils_Type
::T_STRING
,
868 'title' => ts('Receipt cc'),
869 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
871 'size' => CRM_Utils_Type
::HUGE
,
872 'where' => 'civicrm_contribution_page.cc_receipt',
873 'table_name' => 'civicrm_contribution_page',
874 'entity' => 'ContributionPage',
875 'bao' => 'CRM_Contribute_BAO_ContributionPage',
880 'name' => 'bcc_receipt',
881 'type' => CRM_Utils_Type
::T_STRING
,
882 'title' => ts('Receipt bcc'),
883 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
885 'size' => CRM_Utils_Type
::HUGE
,
886 'where' => 'civicrm_contribution_page.bcc_receipt',
887 'table_name' => 'civicrm_contribution_page',
888 'entity' => 'ContributionPage',
889 'bao' => 'CRM_Contribute_BAO_ContributionPage',
894 'name' => 'receipt_text',
895 'type' => CRM_Utils_Type
::T_TEXT
,
896 'title' => ts('Receipt Text'),
897 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'),
900 'where' => 'civicrm_contribution_page.receipt_text',
901 'table_name' => 'civicrm_contribution_page',
902 'entity' => 'ContributionPage',
903 'bao' => 'CRM_Contribute_BAO_ContributionPage',
906 'type' => 'TextArea',
911 'name' => 'is_active',
912 'type' => CRM_Utils_Type
::T_BOOLEAN
,
913 'title' => ts('Is Page Active?'),
914 'description' => ts('Is this property active?'),
915 'where' => 'civicrm_contribution_page.is_active',
916 'table_name' => 'civicrm_contribution_page',
917 'entity' => 'ContributionPage',
918 'bao' => 'CRM_Contribute_BAO_ContributionPage',
923 'name' => 'footer_text',
924 'type' => CRM_Utils_Type
::T_TEXT
,
925 'title' => ts('Footer Text'),
926 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
929 'where' => 'civicrm_contribution_page.footer_text',
930 'table_name' => 'civicrm_contribution_page',
931 'entity' => 'ContributionPage',
932 'bao' => 'CRM_Contribute_BAO_ContributionPage',
935 'type' => 'RichTextEditor',
939 'amount_block_is_active' => [
940 'name' => 'amount_block_is_active',
941 'type' => CRM_Utils_Type
::T_BOOLEAN
,
942 'title' => ts('Is Amount Block Active?'),
943 'description' => ts('Is this property active?'),
944 'where' => 'civicrm_contribution_page.amount_block_is_active',
946 'table_name' => 'civicrm_contribution_page',
947 'entity' => 'ContributionPage',
948 'bao' => 'CRM_Contribute_BAO_ContributionPage',
953 'name' => 'start_date',
954 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
955 'title' => ts('Contribution Page Start Date'),
956 'description' => ts('Date and time that this page starts.'),
957 'where' => 'civicrm_contribution_page.start_date',
958 'table_name' => 'civicrm_contribution_page',
959 'entity' => 'ContributionPage',
960 'bao' => 'CRM_Contribute_BAO_ContributionPage',
965 'name' => 'end_date',
966 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
967 'title' => ts('Contribution Page End Date'),
968 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
969 'where' => 'civicrm_contribution_page.end_date',
970 'table_name' => 'civicrm_contribution_page',
971 'entity' => 'ContributionPage',
972 'bao' => 'CRM_Contribute_BAO_ContributionPage',
977 'name' => 'created_id',
978 'type' => CRM_Utils_Type
::T_INT
,
979 'title' => ts('Created By Contact ID'),
980 'description' => ts('FK to civicrm_contact, who created this contribution page'),
981 'where' => 'civicrm_contribution_page.created_id',
982 'table_name' => 'civicrm_contribution_page',
983 'entity' => 'ContributionPage',
984 'bao' => 'CRM_Contribute_BAO_ContributionPage',
986 'FKClassName' => 'CRM_Contact_DAO_Contact',
988 'label' => ts("Created By"),
993 'name' => 'created_date',
994 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
995 'title' => ts('Contribution Page Created Date'),
996 'description' => ts('Date and time that contribution page was created.'),
997 'where' => 'civicrm_contribution_page.created_date',
998 'table_name' => 'civicrm_contribution_page',
999 'entity' => 'ContributionPage',
1000 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1005 'name' => 'currency',
1006 'type' => CRM_Utils_Type
::T_STRING
,
1007 'title' => ts('Contribution Page Currency'),
1008 'description' => ts('3 character string, value from config setting or input via user.'),
1010 'size' => CRM_Utils_Type
::FOUR
,
1011 'where' => 'civicrm_contribution_page.currency',
1012 'headerPattern' => '/cur(rency)?/i',
1013 'dataPattern' => '/^[A-Z]{3}$/i',
1014 'default' => 'NULL',
1015 'table_name' => 'civicrm_contribution_page',
1016 'entity' => 'ContributionPage',
1017 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1022 'pseudoconstant' => [
1023 'table' => 'civicrm_currency',
1024 'keyColumn' => 'name',
1025 'labelColumn' => 'full_name',
1026 'nameColumn' => 'name',
1027 'abbrColumn' => 'symbol',
1032 'name' => 'campaign_id',
1033 'type' => CRM_Utils_Type
::T_INT
,
1034 'title' => ts('Campaign ID'),
1035 'description' => ts('The campaign for which we are collecting contributions with this page.'),
1036 'where' => 'civicrm_contribution_page.campaign_id',
1037 'table_name' => 'civicrm_contribution_page',
1038 'entity' => 'ContributionPage',
1039 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1041 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1043 'label' => ts("Campaign"),
1048 'name' => 'is_share',
1049 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1050 'title' => ts('Is Contribution Page Shared?'),
1051 'description' => ts('Can people share the contribution page through social media?'),
1052 'where' => 'civicrm_contribution_page.is_share',
1054 'table_name' => 'civicrm_contribution_page',
1055 'entity' => 'ContributionPage',
1056 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1060 'is_billing_required' => [
1061 'name' => 'is_billing_required',
1062 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1063 'title' => ts('Is billing block required'),
1064 'description' => ts('if true - billing block is required for online contribution page'),
1065 'where' => 'civicrm_contribution_page.is_billing_required',
1067 'table_name' => 'civicrm_contribution_page',
1068 'entity' => 'ContributionPage',
1069 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1073 'contribution_page_frontend_title' => [
1074 'name' => 'frontend_title',
1075 'type' => CRM_Utils_Type
::T_STRING
,
1076 'title' => ts('Public Title'),
1077 'description' => ts('Contribution Page Public title'),
1079 'size' => CRM_Utils_Type
::HUGE
,
1080 'where' => 'civicrm_contribution_page.frontend_title',
1081 'default' => 'NULL',
1082 'table_name' => 'civicrm_contribution_page',
1083 'entity' => 'ContributionPage',
1084 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1092 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1094 return Civi
::$statics[__CLASS__
]['fields'];
1098 * Return a mapping from field-name to the corresponding key (as used in fields()).
1101 * Array(string $name => string $uniqueName).
1103 public static function &fieldKeys() {
1104 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1105 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1107 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1111 * Returns the names of this table
1115 public static function getTableName() {
1116 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1120 * Returns if this table needs to be logged
1124 public function getLog() {
1129 * Returns the list of fields that can be imported
1131 * @param bool $prefix
1135 public static function &import($prefix = FALSE) {
1136 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1141 * Returns the list of fields that can be exported
1143 * @param bool $prefix
1147 public static function &export($prefix = FALSE) {
1148 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1153 * Returns the list of indices
1155 * @param bool $localize
1159 public static function indices($localize = TRUE) {
1161 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;