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:a8f42298c3fbe5b8c1986c81d77a8a0f)
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',
421 'type' => CRM_Utils_Type
::T_STRING
,
422 'title' => ts('Contribution Page Title'),
423 'description' => ts('Contribution Page title. For top of page display'),
425 'size' => CRM_Utils_Type
::HUGE
,
426 'where' => 'civicrm_contribution_page.title',
427 'table_name' => 'civicrm_contribution_page',
428 'entity' => 'ContributionPage',
429 'bao' => 'CRM_Contribute_BAO_ContributionPage',
434 'name' => 'intro_text',
435 'type' => CRM_Utils_Type
::T_TEXT
,
436 'title' => ts('Contribution Page Introduction Text'),
437 'description' => ts('Text and html allowed. Displayed below title.'),
440 'where' => 'civicrm_contribution_page.intro_text',
441 'table_name' => 'civicrm_contribution_page',
442 'entity' => 'ContributionPage',
443 'bao' => 'CRM_Contribute_BAO_ContributionPage',
446 'type' => 'RichTextEditor',
450 'financial_type_id' => [
451 'name' => 'financial_type_id',
452 'type' => CRM_Utils_Type
::T_INT
,
453 'title' => ts('Financial Type'),
454 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
455 'where' => 'civicrm_contribution_page.financial_type_id',
456 'table_name' => 'civicrm_contribution_page',
457 'entity' => 'ContributionPage',
458 'bao' => 'CRM_Contribute_BAO_ContributionPage',
460 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
464 'pseudoconstant' => [
465 'table' => 'civicrm_financial_type',
467 'labelColumn' => 'name',
471 'payment_processor' => [
472 'name' => 'payment_processor',
473 'type' => CRM_Utils_Type
::T_STRING
,
474 'title' => ts('Payment Processor'),
475 'description' => ts('Payment Processors configured for this contribution Page'),
477 'size' => CRM_Utils_Type
::HUGE
,
478 'where' => 'civicrm_contribution_page.payment_processor',
479 'table_name' => 'civicrm_contribution_page',
480 'entity' => 'ContributionPage',
481 'bao' => 'CRM_Contribute_BAO_ContributionPage',
483 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
487 'pseudoconstant' => [
488 'table' => 'civicrm_payment_processor',
490 'labelColumn' => 'name',
494 'is_credit_card_only' => [
495 'name' => 'is_credit_card_only',
496 'type' => CRM_Utils_Type
::T_BOOLEAN
,
497 'title' => ts('Is Credit Card Only?'),
498 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
499 'where' => 'civicrm_contribution_page.is_credit_card_only',
501 'table_name' => 'civicrm_contribution_page',
502 'entity' => 'ContributionPage',
503 'bao' => 'CRM_Contribute_BAO_ContributionPage',
508 'name' => 'is_monetary',
509 'type' => CRM_Utils_Type
::T_BOOLEAN
,
510 'title' => ts('Is Monetary'),
511 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
512 'where' => 'civicrm_contribution_page.is_monetary',
514 'table_name' => 'civicrm_contribution_page',
515 'entity' => 'ContributionPage',
516 'bao' => 'CRM_Contribute_BAO_ContributionPage',
521 'name' => 'is_recur',
522 'type' => CRM_Utils_Type
::T_BOOLEAN
,
523 'title' => ts('Is Recurring'),
524 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
525 'where' => 'civicrm_contribution_page.is_recur',
527 'table_name' => 'civicrm_contribution_page',
528 'entity' => 'ContributionPage',
529 'bao' => 'CRM_Contribute_BAO_ContributionPage',
533 'is_confirm_enabled' => [
534 'name' => 'is_confirm_enabled',
535 'type' => CRM_Utils_Type
::T_BOOLEAN
,
536 'title' => ts('Confirmation Page?'),
537 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
538 'where' => 'civicrm_contribution_page.is_confirm_enabled',
540 'table_name' => 'civicrm_contribution_page',
541 'entity' => 'ContributionPage',
542 'bao' => 'CRM_Contribute_BAO_ContributionPage',
546 'recur_frequency_unit' => [
547 'name' => 'recur_frequency_unit',
548 'type' => CRM_Utils_Type
::T_STRING
,
549 'title' => ts('Recurring Frequency'),
550 'description' => ts('Supported recurring frequency units.'),
552 'size' => CRM_Utils_Type
::HUGE
,
553 'where' => 'civicrm_contribution_page.recur_frequency_unit',
554 'table_name' => 'civicrm_contribution_page',
555 'entity' => 'ContributionPage',
556 'bao' => 'CRM_Contribute_BAO_ContributionPage',
558 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
562 'pseudoconstant' => [
563 'optionGroupName' => 'recur_frequency_units',
564 'keyColumn' => 'name',
565 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
569 'is_recur_interval' => [
570 'name' => 'is_recur_interval',
571 'type' => CRM_Utils_Type
::T_BOOLEAN
,
572 'title' => ts('Support Recurring Intervals'),
573 'description' => ts('if true - supports recurring intervals'),
574 'where' => 'civicrm_contribution_page.is_recur_interval',
576 'table_name' => 'civicrm_contribution_page',
577 'entity' => 'ContributionPage',
578 'bao' => 'CRM_Contribute_BAO_ContributionPage',
582 'is_recur_installments' => [
583 'name' => 'is_recur_installments',
584 'type' => CRM_Utils_Type
::T_BOOLEAN
,
585 'title' => ts('Recurring Installments?'),
586 'description' => ts('if true - asks user for recurring installments'),
587 'where' => 'civicrm_contribution_page.is_recur_installments',
589 'table_name' => 'civicrm_contribution_page',
590 'entity' => 'ContributionPage',
591 'bao' => 'CRM_Contribute_BAO_ContributionPage',
595 'adjust_recur_start_date' => [
596 'name' => 'adjust_recur_start_date',
597 'type' => CRM_Utils_Type
::T_BOOLEAN
,
598 'title' => ts('Adjust Recurring Start Date'),
599 'description' => ts('if true - user is able to adjust payment start date'),
600 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
602 'table_name' => 'civicrm_contribution_page',
603 'entity' => 'ContributionPage',
604 'bao' => 'CRM_Contribute_BAO_ContributionPage',
609 'name' => 'is_pay_later',
610 'type' => CRM_Utils_Type
::T_BOOLEAN
,
611 'title' => ts('Pay Later'),
612 'description' => ts('if true - allows the user to send payment directly to the org later'),
613 'where' => 'civicrm_contribution_page.is_pay_later',
615 'table_name' => 'civicrm_contribution_page',
616 'entity' => 'ContributionPage',
617 'bao' => 'CRM_Contribute_BAO_ContributionPage',
621 'pay_later_text' => [
622 'name' => 'pay_later_text',
623 'type' => CRM_Utils_Type
::T_TEXT
,
624 'title' => ts('Pay Later Text'),
625 'description' => ts('The text displayed to the user in the main form'),
626 'where' => 'civicrm_contribution_page.pay_later_text',
627 'table_name' => 'civicrm_contribution_page',
628 'entity' => 'ContributionPage',
629 'bao' => 'CRM_Contribute_BAO_ContributionPage',
633 'pay_later_receipt' => [
634 'name' => 'pay_later_receipt',
635 'type' => CRM_Utils_Type
::T_TEXT
,
636 'title' => ts('Pay Later Receipt'),
637 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
638 'where' => 'civicrm_contribution_page.pay_later_receipt',
639 'table_name' => 'civicrm_contribution_page',
640 'entity' => 'ContributionPage',
641 'bao' => 'CRM_Contribute_BAO_ContributionPage',
645 'is_partial_payment' => [
646 'name' => 'is_partial_payment',
647 'type' => CRM_Utils_Type
::T_BOOLEAN
,
648 'title' => ts('Allow Partial Payment'),
649 'description' => ts('is partial payment enabled for this online contribution page'),
650 'where' => 'civicrm_contribution_page.is_partial_payment',
652 'table_name' => 'civicrm_contribution_page',
653 'entity' => 'ContributionPage',
654 'bao' => 'CRM_Contribute_BAO_ContributionPage',
658 'initial_amount_label' => [
659 'name' => 'initial_amount_label',
660 'type' => CRM_Utils_Type
::T_STRING
,
661 'title' => ts('Initial Amount Label'),
662 'description' => ts('Initial amount label for partial payment'),
664 'size' => CRM_Utils_Type
::HUGE
,
665 'where' => 'civicrm_contribution_page.initial_amount_label',
666 'table_name' => 'civicrm_contribution_page',
667 'entity' => 'ContributionPage',
668 'bao' => 'CRM_Contribute_BAO_ContributionPage',
672 'initial_amount_help_text' => [
673 'name' => 'initial_amount_help_text',
674 'type' => CRM_Utils_Type
::T_TEXT
,
675 'title' => ts('Initial Amount Help Text'),
676 'description' => ts('Initial amount help text for partial payment'),
677 'where' => 'civicrm_contribution_page.initial_amount_help_text',
678 'table_name' => 'civicrm_contribution_page',
679 'entity' => 'ContributionPage',
680 'bao' => 'CRM_Contribute_BAO_ContributionPage',
684 'min_initial_amount' => [
685 'name' => 'min_initial_amount',
686 'type' => CRM_Utils_Type
::T_MONEY
,
687 'title' => ts('Min Initial Amount'),
688 'description' => ts('Minimum initial amount for partial payment'),
693 'where' => 'civicrm_contribution_page.min_initial_amount',
694 'table_name' => 'civicrm_contribution_page',
695 'entity' => 'ContributionPage',
696 'bao' => 'CRM_Contribute_BAO_ContributionPage',
700 'is_allow_other_amount' => [
701 'name' => 'is_allow_other_amount',
702 'type' => CRM_Utils_Type
::T_BOOLEAN
,
703 'title' => ts('Allow Other Amounts'),
704 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
705 'where' => 'civicrm_contribution_page.is_allow_other_amount',
707 'table_name' => 'civicrm_contribution_page',
708 'entity' => 'ContributionPage',
709 'bao' => 'CRM_Contribute_BAO_ContributionPage',
713 'default_amount_id' => [
714 'name' => 'default_amount_id',
715 'type' => CRM_Utils_Type
::T_INT
,
716 'title' => ts('Default Amount'),
717 'description' => ts('FK to civicrm_option_value.'),
718 'where' => 'civicrm_contribution_page.default_amount_id',
719 'table_name' => 'civicrm_contribution_page',
720 'entity' => 'ContributionPage',
721 'bao' => 'CRM_Contribute_BAO_ContributionPage',
726 'name' => 'min_amount',
727 'type' => CRM_Utils_Type
::T_MONEY
,
728 'title' => ts('Minimum Amount'),
729 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
734 'where' => 'civicrm_contribution_page.min_amount',
735 'table_name' => 'civicrm_contribution_page',
736 'entity' => 'ContributionPage',
737 'bao' => 'CRM_Contribute_BAO_ContributionPage',
742 'name' => 'max_amount',
743 'type' => CRM_Utils_Type
::T_MONEY
,
744 'title' => ts('Maximum Amount'),
745 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
750 'where' => 'civicrm_contribution_page.max_amount',
751 'table_name' => 'civicrm_contribution_page',
752 'entity' => 'ContributionPage',
753 'bao' => 'CRM_Contribute_BAO_ContributionPage',
758 'name' => 'goal_amount',
759 'type' => CRM_Utils_Type
::T_MONEY
,
760 'title' => ts('Goal Amount'),
761 'description' => ts('The target goal for this page, allows people to build a goal meter'),
766 'where' => 'civicrm_contribution_page.goal_amount',
767 'table_name' => 'civicrm_contribution_page',
768 'entity' => 'ContributionPage',
769 'bao' => 'CRM_Contribute_BAO_ContributionPage',
773 'thankyou_title' => [
774 'name' => 'thankyou_title',
775 'type' => CRM_Utils_Type
::T_STRING
,
776 'title' => ts('Thank-you Title'),
777 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
779 'size' => CRM_Utils_Type
::HUGE
,
780 'where' => 'civicrm_contribution_page.thankyou_title',
781 'table_name' => 'civicrm_contribution_page',
782 'entity' => 'ContributionPage',
783 'bao' => 'CRM_Contribute_BAO_ContributionPage',
788 'name' => 'thankyou_text',
789 'type' => CRM_Utils_Type
::T_TEXT
,
790 'title' => ts('Thank-you Text'),
791 'description' => ts('text and html allowed. displayed above result on success page'),
794 'where' => 'civicrm_contribution_page.thankyou_text',
795 'table_name' => 'civicrm_contribution_page',
796 'entity' => 'ContributionPage',
797 'bao' => 'CRM_Contribute_BAO_ContributionPage',
800 'type' => 'RichTextEditor',
804 'thankyou_footer' => [
805 'name' => 'thankyou_footer',
806 'type' => CRM_Utils_Type
::T_TEXT
,
807 'title' => ts('Thank-you Footer'),
808 '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.'),
811 'where' => 'civicrm_contribution_page.thankyou_footer',
812 'table_name' => 'civicrm_contribution_page',
813 'entity' => 'ContributionPage',
814 'bao' => 'CRM_Contribute_BAO_ContributionPage',
817 'type' => 'RichTextEditor',
821 'is_email_receipt' => [
822 'name' => 'is_email_receipt',
823 'type' => CRM_Utils_Type
::T_BOOLEAN
,
824 'title' => ts('Send email Receipt'),
825 'description' => ts('if true, receipt is automatically emailed to contact on success'),
826 'where' => 'civicrm_contribution_page.is_email_receipt',
828 'table_name' => 'civicrm_contribution_page',
829 'entity' => 'ContributionPage',
830 'bao' => 'CRM_Contribute_BAO_ContributionPage',
834 'receipt_from_name' => [
835 'name' => 'receipt_from_name',
836 'type' => CRM_Utils_Type
::T_STRING
,
837 'title' => ts('Receipt From'),
838 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
840 'size' => CRM_Utils_Type
::HUGE
,
841 'where' => 'civicrm_contribution_page.receipt_from_name',
842 'table_name' => 'civicrm_contribution_page',
843 'entity' => 'ContributionPage',
844 'bao' => 'CRM_Contribute_BAO_ContributionPage',
848 'receipt_from_email' => [
849 'name' => 'receipt_from_email',
850 'type' => CRM_Utils_Type
::T_STRING
,
851 'title' => ts('Receipt From email'),
852 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
854 'size' => CRM_Utils_Type
::HUGE
,
855 'where' => 'civicrm_contribution_page.receipt_from_email',
856 'table_name' => 'civicrm_contribution_page',
857 'entity' => 'ContributionPage',
858 'bao' => 'CRM_Contribute_BAO_ContributionPage',
863 'name' => 'cc_receipt',
864 'type' => CRM_Utils_Type
::T_STRING
,
865 'title' => ts('Receipt cc'),
866 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
868 'size' => CRM_Utils_Type
::HUGE
,
869 'where' => 'civicrm_contribution_page.cc_receipt',
870 'table_name' => 'civicrm_contribution_page',
871 'entity' => 'ContributionPage',
872 'bao' => 'CRM_Contribute_BAO_ContributionPage',
877 'name' => 'bcc_receipt',
878 'type' => CRM_Utils_Type
::T_STRING
,
879 'title' => ts('Receipt bcc'),
880 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
882 'size' => CRM_Utils_Type
::HUGE
,
883 'where' => 'civicrm_contribution_page.bcc_receipt',
884 'table_name' => 'civicrm_contribution_page',
885 'entity' => 'ContributionPage',
886 'bao' => 'CRM_Contribute_BAO_ContributionPage',
891 'name' => 'receipt_text',
892 'type' => CRM_Utils_Type
::T_TEXT
,
893 'title' => ts('Receipt Text'),
894 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'),
897 'where' => 'civicrm_contribution_page.receipt_text',
898 'table_name' => 'civicrm_contribution_page',
899 'entity' => 'ContributionPage',
900 'bao' => 'CRM_Contribute_BAO_ContributionPage',
903 'type' => 'TextArea',
908 'name' => 'is_active',
909 'type' => CRM_Utils_Type
::T_BOOLEAN
,
910 'title' => ts('Is Page Active?'),
911 'description' => ts('Is this property active?'),
912 'where' => 'civicrm_contribution_page.is_active',
913 'table_name' => 'civicrm_contribution_page',
914 'entity' => 'ContributionPage',
915 'bao' => 'CRM_Contribute_BAO_ContributionPage',
920 'name' => 'footer_text',
921 'type' => CRM_Utils_Type
::T_TEXT
,
922 'title' => ts('Footer Text'),
923 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
926 'where' => 'civicrm_contribution_page.footer_text',
927 'table_name' => 'civicrm_contribution_page',
928 'entity' => 'ContributionPage',
929 'bao' => 'CRM_Contribute_BAO_ContributionPage',
932 'type' => 'RichTextEditor',
936 'amount_block_is_active' => [
937 'name' => 'amount_block_is_active',
938 'type' => CRM_Utils_Type
::T_BOOLEAN
,
939 'title' => ts('Is Amount Block Active?'),
940 'description' => ts('Is this property active?'),
941 'where' => 'civicrm_contribution_page.amount_block_is_active',
943 'table_name' => 'civicrm_contribution_page',
944 'entity' => 'ContributionPage',
945 'bao' => 'CRM_Contribute_BAO_ContributionPage',
950 'name' => 'start_date',
951 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
952 'title' => ts('Contribution Page Start Date'),
953 'description' => ts('Date and time that this page starts.'),
954 'where' => 'civicrm_contribution_page.start_date',
955 'table_name' => 'civicrm_contribution_page',
956 'entity' => 'ContributionPage',
957 'bao' => 'CRM_Contribute_BAO_ContributionPage',
962 'name' => 'end_date',
963 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
964 'title' => ts('Contribution Page End Date'),
965 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
966 'where' => 'civicrm_contribution_page.end_date',
967 'table_name' => 'civicrm_contribution_page',
968 'entity' => 'ContributionPage',
969 'bao' => 'CRM_Contribute_BAO_ContributionPage',
974 'name' => 'created_id',
975 'type' => CRM_Utils_Type
::T_INT
,
976 'title' => ts('Contribution Page Created By'),
977 'description' => ts('FK to civicrm_contact, who created this contribution page'),
978 'where' => 'civicrm_contribution_page.created_id',
979 'table_name' => 'civicrm_contribution_page',
980 'entity' => 'ContributionPage',
981 'bao' => 'CRM_Contribute_BAO_ContributionPage',
983 'FKClassName' => 'CRM_Contact_DAO_Contact',
987 'name' => 'created_date',
988 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
989 'title' => ts('Contribution Page Created Date'),
990 'description' => ts('Date and time that contribution page was created.'),
991 'where' => 'civicrm_contribution_page.created_date',
992 'table_name' => 'civicrm_contribution_page',
993 'entity' => 'ContributionPage',
994 'bao' => 'CRM_Contribute_BAO_ContributionPage',
999 'name' => 'currency',
1000 'type' => CRM_Utils_Type
::T_STRING
,
1001 'title' => ts('Contribution Page Currency'),
1002 'description' => ts('3 character string, value from config setting or input via user.'),
1004 'size' => CRM_Utils_Type
::FOUR
,
1005 'where' => 'civicrm_contribution_page.currency',
1006 'headerPattern' => '/cur(rency)?/i',
1007 'dataPattern' => '/^[A-Z]{3}$/i',
1008 'default' => 'NULL',
1009 'table_name' => 'civicrm_contribution_page',
1010 'entity' => 'ContributionPage',
1011 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1016 'pseudoconstant' => [
1017 'table' => 'civicrm_currency',
1018 'keyColumn' => 'name',
1019 'labelColumn' => 'full_name',
1020 'nameColumn' => 'name',
1021 'abbrColumn' => 'symbol',
1026 'name' => 'campaign_id',
1027 'type' => CRM_Utils_Type
::T_INT
,
1028 'title' => ts('Contribution Page Campaign ID'),
1029 'description' => ts('The campaign for which we are collecting contributions with this page.'),
1030 'where' => 'civicrm_contribution_page.campaign_id',
1031 'table_name' => 'civicrm_contribution_page',
1032 'entity' => 'ContributionPage',
1033 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1035 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1039 'name' => 'is_share',
1040 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1041 'title' => ts('Is Contribution Page Shared?'),
1042 'description' => ts('Can people share the contribution page through social media?'),
1043 'where' => 'civicrm_contribution_page.is_share',
1045 'table_name' => 'civicrm_contribution_page',
1046 'entity' => 'ContributionPage',
1047 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1051 'is_billing_required' => [
1052 'name' => 'is_billing_required',
1053 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1054 'title' => ts('Is billing block required'),
1055 'description' => ts('if true - billing block is required for online contribution page'),
1056 'where' => 'civicrm_contribution_page.is_billing_required',
1058 'table_name' => 'civicrm_contribution_page',
1059 'entity' => 'ContributionPage',
1060 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1064 'contribution_page_frontend_title' => [
1065 'name' => 'frontend_title',
1066 'type' => CRM_Utils_Type
::T_STRING
,
1067 'title' => ts('Public Title'),
1068 'description' => ts('Contribution Page Public title'),
1070 'size' => CRM_Utils_Type
::HUGE
,
1071 'where' => 'civicrm_contribution_page.frontend_title',
1072 'default' => 'NULL',
1073 'table_name' => 'civicrm_contribution_page',
1074 'entity' => 'ContributionPage',
1075 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1083 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1085 return Civi
::$statics[__CLASS__
]['fields'];
1089 * Return a mapping from field-name to the corresponding key (as used in fields()).
1092 * Array(string $name => string $uniqueName).
1094 public static function &fieldKeys() {
1095 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1096 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1098 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1102 * Returns the names of this table
1106 public static function getTableName() {
1107 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1111 * Returns if this table needs to be logged
1115 public function getLog() {
1120 * Returns the list of fields that can be imported
1122 * @param bool $prefix
1126 public static function &import($prefix = FALSE) {
1127 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1132 * Returns the list of fields that can be exported
1134 * @param bool $prefix
1138 public static function &export($prefix = FALSE) {
1139 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1144 * Returns the list of indices
1146 * @param bool $localize
1150 public static function indices($localize = TRUE) {
1152 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;