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:bba87623f1ecb7c432b3e59cb159b5ea)
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',
425 'type' => CRM_Utils_Type
::T_STRING
,
426 'title' => ts('Contribution Page Title'),
427 'description' => ts('Contribution Page title. For top of page display'),
429 'size' => CRM_Utils_Type
::HUGE
,
430 'where' => 'civicrm_contribution_page.title',
431 'table_name' => 'civicrm_contribution_page',
432 'entity' => 'ContributionPage',
433 'bao' => 'CRM_Contribute_BAO_ContributionPage',
438 'name' => 'intro_text',
439 'type' => CRM_Utils_Type
::T_TEXT
,
440 'title' => ts('Contribution Page Introduction Text'),
441 'description' => ts('Text and html allowed. Displayed below title.'),
444 'where' => 'civicrm_contribution_page.intro_text',
445 'table_name' => 'civicrm_contribution_page',
446 'entity' => 'ContributionPage',
447 'bao' => 'CRM_Contribute_BAO_ContributionPage',
450 'type' => 'RichTextEditor',
454 'financial_type_id' => [
455 'name' => 'financial_type_id',
456 'type' => CRM_Utils_Type
::T_INT
,
457 'title' => ts('Financial Type ID'),
458 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
459 'where' => 'civicrm_contribution_page.financial_type_id',
460 'table_name' => 'civicrm_contribution_page',
461 'entity' => 'ContributionPage',
462 'bao' => 'CRM_Contribute_BAO_ContributionPage',
464 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
467 'label' => ts("Financial Type"),
469 'pseudoconstant' => [
470 'table' => 'civicrm_financial_type',
472 'labelColumn' => 'name',
476 'payment_processor' => [
477 'name' => 'payment_processor',
478 'type' => CRM_Utils_Type
::T_STRING
,
479 'title' => ts('Payment Processor'),
480 'description' => ts('Payment Processors configured for this contribution Page'),
482 'size' => CRM_Utils_Type
::HUGE
,
483 'where' => 'civicrm_contribution_page.payment_processor',
484 'table_name' => 'civicrm_contribution_page',
485 'entity' => 'ContributionPage',
486 'bao' => 'CRM_Contribute_BAO_ContributionPage',
488 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
491 'label' => ts("Payment Processors"),
493 'pseudoconstant' => [
494 'table' => 'civicrm_payment_processor',
496 'labelColumn' => 'name',
500 'is_credit_card_only' => [
501 'name' => 'is_credit_card_only',
502 'type' => CRM_Utils_Type
::T_BOOLEAN
,
503 'title' => ts('Is Credit Card Only?'),
504 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
505 'where' => 'civicrm_contribution_page.is_credit_card_only',
507 'table_name' => 'civicrm_contribution_page',
508 'entity' => 'ContributionPage',
509 'bao' => 'CRM_Contribute_BAO_ContributionPage',
514 'name' => 'is_monetary',
515 'type' => CRM_Utils_Type
::T_BOOLEAN
,
516 'title' => ts('Is Monetary'),
517 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
518 'where' => 'civicrm_contribution_page.is_monetary',
520 'table_name' => 'civicrm_contribution_page',
521 'entity' => 'ContributionPage',
522 'bao' => 'CRM_Contribute_BAO_ContributionPage',
527 'name' => 'is_recur',
528 'type' => CRM_Utils_Type
::T_BOOLEAN
,
529 'title' => ts('Is Recurring'),
530 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
531 'where' => 'civicrm_contribution_page.is_recur',
533 'table_name' => 'civicrm_contribution_page',
534 'entity' => 'ContributionPage',
535 'bao' => 'CRM_Contribute_BAO_ContributionPage',
539 'is_confirm_enabled' => [
540 'name' => 'is_confirm_enabled',
541 'type' => CRM_Utils_Type
::T_BOOLEAN
,
542 'title' => ts('Confirmation Page?'),
543 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
544 'where' => 'civicrm_contribution_page.is_confirm_enabled',
546 'table_name' => 'civicrm_contribution_page',
547 'entity' => 'ContributionPage',
548 'bao' => 'CRM_Contribute_BAO_ContributionPage',
552 'recur_frequency_unit' => [
553 'name' => 'recur_frequency_unit',
554 'type' => CRM_Utils_Type
::T_STRING
,
555 'title' => ts('Recurring Frequency'),
556 'description' => ts('Supported recurring frequency units.'),
558 'size' => CRM_Utils_Type
::HUGE
,
559 'where' => 'civicrm_contribution_page.recur_frequency_unit',
560 'table_name' => 'civicrm_contribution_page',
561 'entity' => 'ContributionPage',
562 'bao' => 'CRM_Contribute_BAO_ContributionPage',
564 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
568 'pseudoconstant' => [
569 'optionGroupName' => 'recur_frequency_units',
570 'keyColumn' => 'name',
571 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
575 'is_recur_interval' => [
576 'name' => 'is_recur_interval',
577 'type' => CRM_Utils_Type
::T_BOOLEAN
,
578 'title' => ts('Support Recurring Intervals'),
579 'description' => ts('if true - supports recurring intervals'),
580 'where' => 'civicrm_contribution_page.is_recur_interval',
582 'table_name' => 'civicrm_contribution_page',
583 'entity' => 'ContributionPage',
584 'bao' => 'CRM_Contribute_BAO_ContributionPage',
588 'is_recur_installments' => [
589 'name' => 'is_recur_installments',
590 'type' => CRM_Utils_Type
::T_BOOLEAN
,
591 'title' => ts('Recurring Installments?'),
592 'description' => ts('if true - asks user for recurring installments'),
593 'where' => 'civicrm_contribution_page.is_recur_installments',
595 'table_name' => 'civicrm_contribution_page',
596 'entity' => 'ContributionPage',
597 'bao' => 'CRM_Contribute_BAO_ContributionPage',
601 'adjust_recur_start_date' => [
602 'name' => 'adjust_recur_start_date',
603 'type' => CRM_Utils_Type
::T_BOOLEAN
,
604 'title' => ts('Adjust Recurring Start Date'),
605 'description' => ts('if true - user is able to adjust payment start date'),
606 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
608 'table_name' => 'civicrm_contribution_page',
609 'entity' => 'ContributionPage',
610 'bao' => 'CRM_Contribute_BAO_ContributionPage',
615 'name' => 'is_pay_later',
616 'type' => CRM_Utils_Type
::T_BOOLEAN
,
617 'title' => ts('Pay Later'),
618 'description' => ts('if true - allows the user to send payment directly to the org later'),
619 'where' => 'civicrm_contribution_page.is_pay_later',
621 'table_name' => 'civicrm_contribution_page',
622 'entity' => 'ContributionPage',
623 'bao' => 'CRM_Contribute_BAO_ContributionPage',
627 'pay_later_text' => [
628 'name' => 'pay_later_text',
629 'type' => CRM_Utils_Type
::T_TEXT
,
630 'title' => ts('Pay Later Text'),
631 'description' => ts('The text displayed to the user in the main form'),
632 'where' => 'civicrm_contribution_page.pay_later_text',
633 'table_name' => 'civicrm_contribution_page',
634 'entity' => 'ContributionPage',
635 'bao' => 'CRM_Contribute_BAO_ContributionPage',
639 'pay_later_receipt' => [
640 'name' => 'pay_later_receipt',
641 'type' => CRM_Utils_Type
::T_TEXT
,
642 'title' => ts('Pay Later Receipt'),
643 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
644 'where' => 'civicrm_contribution_page.pay_later_receipt',
645 'table_name' => 'civicrm_contribution_page',
646 'entity' => 'ContributionPage',
647 'bao' => 'CRM_Contribute_BAO_ContributionPage',
651 'is_partial_payment' => [
652 'name' => 'is_partial_payment',
653 'type' => CRM_Utils_Type
::T_BOOLEAN
,
654 'title' => ts('Allow Partial Payment'),
655 'description' => ts('is partial payment enabled for this online contribution page'),
656 'where' => 'civicrm_contribution_page.is_partial_payment',
658 'table_name' => 'civicrm_contribution_page',
659 'entity' => 'ContributionPage',
660 'bao' => 'CRM_Contribute_BAO_ContributionPage',
664 'initial_amount_label' => [
665 'name' => 'initial_amount_label',
666 'type' => CRM_Utils_Type
::T_STRING
,
667 'title' => ts('Initial Amount Label'),
668 'description' => ts('Initial amount label for partial payment'),
670 'size' => CRM_Utils_Type
::HUGE
,
671 'where' => 'civicrm_contribution_page.initial_amount_label',
672 'table_name' => 'civicrm_contribution_page',
673 'entity' => 'ContributionPage',
674 'bao' => 'CRM_Contribute_BAO_ContributionPage',
677 'label' => ts("Initial Amount Label"),
681 'initial_amount_help_text' => [
682 'name' => 'initial_amount_help_text',
683 'type' => CRM_Utils_Type
::T_TEXT
,
684 'title' => ts('Initial Amount Help Text'),
685 'description' => ts('Initial amount help text for partial payment'),
686 'where' => 'civicrm_contribution_page.initial_amount_help_text',
687 'table_name' => 'civicrm_contribution_page',
688 'entity' => 'ContributionPage',
689 'bao' => 'CRM_Contribute_BAO_ContributionPage',
692 'label' => ts("Initial Amount Help Text"),
696 'min_initial_amount' => [
697 'name' => 'min_initial_amount',
698 'type' => CRM_Utils_Type
::T_MONEY
,
699 'title' => ts('Min Initial Amount'),
700 'description' => ts('Minimum initial amount for partial payment'),
705 'where' => 'civicrm_contribution_page.min_initial_amount',
706 'table_name' => 'civicrm_contribution_page',
707 'entity' => 'ContributionPage',
708 'bao' => 'CRM_Contribute_BAO_ContributionPage',
711 'label' => ts("Min. Initial Amount"),
715 'is_allow_other_amount' => [
716 'name' => 'is_allow_other_amount',
717 'type' => CRM_Utils_Type
::T_BOOLEAN
,
718 'title' => ts('Allow Other Amounts'),
719 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
720 'where' => 'civicrm_contribution_page.is_allow_other_amount',
722 'table_name' => 'civicrm_contribution_page',
723 'entity' => 'ContributionPage',
724 'bao' => 'CRM_Contribute_BAO_ContributionPage',
728 'default_amount_id' => [
729 'name' => 'default_amount_id',
730 'type' => CRM_Utils_Type
::T_INT
,
731 'title' => ts('Default Amount'),
732 'description' => ts('FK to civicrm_option_value.'),
733 'where' => 'civicrm_contribution_page.default_amount_id',
734 'table_name' => 'civicrm_contribution_page',
735 'entity' => 'ContributionPage',
736 'bao' => 'CRM_Contribute_BAO_ContributionPage',
741 'name' => 'min_amount',
742 'type' => CRM_Utils_Type
::T_MONEY
,
743 'title' => ts('Minimum Amount'),
744 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
749 'where' => 'civicrm_contribution_page.min_amount',
750 'table_name' => 'civicrm_contribution_page',
751 'entity' => 'ContributionPage',
752 'bao' => 'CRM_Contribute_BAO_ContributionPage',
757 'name' => 'max_amount',
758 'type' => CRM_Utils_Type
::T_MONEY
,
759 'title' => ts('Maximum Amount'),
760 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
765 'where' => 'civicrm_contribution_page.max_amount',
766 'table_name' => 'civicrm_contribution_page',
767 'entity' => 'ContributionPage',
768 'bao' => 'CRM_Contribute_BAO_ContributionPage',
773 'name' => 'goal_amount',
774 'type' => CRM_Utils_Type
::T_MONEY
,
775 'title' => ts('Goal Amount'),
776 'description' => ts('The target goal for this page, allows people to build a goal meter'),
781 'where' => 'civicrm_contribution_page.goal_amount',
782 'table_name' => 'civicrm_contribution_page',
783 'entity' => 'ContributionPage',
784 'bao' => 'CRM_Contribute_BAO_ContributionPage',
787 'label' => ts("Goal Amount"),
791 'thankyou_title' => [
792 'name' => 'thankyou_title',
793 'type' => CRM_Utils_Type
::T_STRING
,
794 'title' => ts('Thank-you Title'),
795 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
797 'size' => CRM_Utils_Type
::HUGE
,
798 'where' => 'civicrm_contribution_page.thankyou_title',
799 'table_name' => 'civicrm_contribution_page',
800 'entity' => 'ContributionPage',
801 'bao' => 'CRM_Contribute_BAO_ContributionPage',
806 'name' => 'thankyou_text',
807 'type' => CRM_Utils_Type
::T_TEXT
,
808 'title' => ts('Thank-you Text'),
809 'description' => ts('text and html allowed. displayed above result on success page'),
812 'where' => 'civicrm_contribution_page.thankyou_text',
813 'table_name' => 'civicrm_contribution_page',
814 'entity' => 'ContributionPage',
815 'bao' => 'CRM_Contribute_BAO_ContributionPage',
818 'type' => 'RichTextEditor',
822 'thankyou_footer' => [
823 'name' => 'thankyou_footer',
824 'type' => CRM_Utils_Type
::T_TEXT
,
825 'title' => ts('Thank-you Footer'),
826 '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.'),
829 'where' => 'civicrm_contribution_page.thankyou_footer',
830 'table_name' => 'civicrm_contribution_page',
831 'entity' => 'ContributionPage',
832 'bao' => 'CRM_Contribute_BAO_ContributionPage',
835 'type' => 'RichTextEditor',
839 'is_email_receipt' => [
840 'name' => 'is_email_receipt',
841 'type' => CRM_Utils_Type
::T_BOOLEAN
,
842 'title' => ts('Send email Receipt'),
843 'description' => ts('if true, receipt is automatically emailed to contact on success'),
844 'where' => 'civicrm_contribution_page.is_email_receipt',
846 'table_name' => 'civicrm_contribution_page',
847 'entity' => 'ContributionPage',
848 'bao' => 'CRM_Contribute_BAO_ContributionPage',
852 'receipt_from_name' => [
853 'name' => 'receipt_from_name',
854 'type' => CRM_Utils_Type
::T_STRING
,
855 'title' => ts('Receipt From'),
856 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
858 'size' => CRM_Utils_Type
::HUGE
,
859 'where' => 'civicrm_contribution_page.receipt_from_name',
860 'table_name' => 'civicrm_contribution_page',
861 'entity' => 'ContributionPage',
862 'bao' => 'CRM_Contribute_BAO_ContributionPage',
866 'receipt_from_email' => [
867 'name' => 'receipt_from_email',
868 'type' => CRM_Utils_Type
::T_STRING
,
869 'title' => ts('Receipt From email'),
870 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
872 'size' => CRM_Utils_Type
::HUGE
,
873 'where' => 'civicrm_contribution_page.receipt_from_email',
874 'table_name' => 'civicrm_contribution_page',
875 'entity' => 'ContributionPage',
876 'bao' => 'CRM_Contribute_BAO_ContributionPage',
881 'name' => 'cc_receipt',
882 'type' => CRM_Utils_Type
::T_STRING
,
883 'title' => ts('Receipt cc'),
884 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
886 'size' => CRM_Utils_Type
::HUGE
,
887 'where' => 'civicrm_contribution_page.cc_receipt',
888 'table_name' => 'civicrm_contribution_page',
889 'entity' => 'ContributionPage',
890 'bao' => 'CRM_Contribute_BAO_ContributionPage',
895 'name' => 'bcc_receipt',
896 'type' => CRM_Utils_Type
::T_STRING
,
897 'title' => ts('Receipt bcc'),
898 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
900 'size' => CRM_Utils_Type
::HUGE
,
901 'where' => 'civicrm_contribution_page.bcc_receipt',
902 'table_name' => 'civicrm_contribution_page',
903 'entity' => 'ContributionPage',
904 'bao' => 'CRM_Contribute_BAO_ContributionPage',
909 'name' => 'receipt_text',
910 'type' => CRM_Utils_Type
::T_TEXT
,
911 'title' => ts('Receipt Text'),
912 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'),
915 'where' => 'civicrm_contribution_page.receipt_text',
916 'table_name' => 'civicrm_contribution_page',
917 'entity' => 'ContributionPage',
918 'bao' => 'CRM_Contribute_BAO_ContributionPage',
921 'type' => 'TextArea',
926 'name' => 'is_active',
927 'type' => CRM_Utils_Type
::T_BOOLEAN
,
928 'title' => ts('Is Page Active?'),
929 'description' => ts('Is this property active?'),
930 'where' => 'civicrm_contribution_page.is_active',
931 'table_name' => 'civicrm_contribution_page',
932 'entity' => 'ContributionPage',
933 'bao' => 'CRM_Contribute_BAO_ContributionPage',
938 'name' => 'footer_text',
939 'type' => CRM_Utils_Type
::T_TEXT
,
940 'title' => ts('Footer Text'),
941 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
944 'where' => 'civicrm_contribution_page.footer_text',
945 'table_name' => 'civicrm_contribution_page',
946 'entity' => 'ContributionPage',
947 'bao' => 'CRM_Contribute_BAO_ContributionPage',
950 'type' => 'RichTextEditor',
954 'amount_block_is_active' => [
955 'name' => 'amount_block_is_active',
956 'type' => CRM_Utils_Type
::T_BOOLEAN
,
957 'title' => ts('Is Amount Block Active?'),
958 'description' => ts('Is this property active?'),
959 'where' => 'civicrm_contribution_page.amount_block_is_active',
961 'table_name' => 'civicrm_contribution_page',
962 'entity' => 'ContributionPage',
963 'bao' => 'CRM_Contribute_BAO_ContributionPage',
968 'name' => 'start_date',
969 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
970 'title' => ts('Contribution Page Start Date'),
971 'description' => ts('Date and time that this page starts.'),
972 'where' => 'civicrm_contribution_page.start_date',
973 'table_name' => 'civicrm_contribution_page',
974 'entity' => 'ContributionPage',
975 'bao' => 'CRM_Contribute_BAO_ContributionPage',
980 'name' => 'end_date',
981 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
982 'title' => ts('Contribution Page End Date'),
983 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
984 'where' => 'civicrm_contribution_page.end_date',
985 'table_name' => 'civicrm_contribution_page',
986 'entity' => 'ContributionPage',
987 'bao' => 'CRM_Contribute_BAO_ContributionPage',
992 'name' => 'created_id',
993 'type' => CRM_Utils_Type
::T_INT
,
994 'title' => ts('Created By Contact ID'),
995 'description' => ts('FK to civicrm_contact, who created this contribution page'),
996 'where' => 'civicrm_contribution_page.created_id',
997 'table_name' => 'civicrm_contribution_page',
998 'entity' => 'ContributionPage',
999 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1001 'FKClassName' => 'CRM_Contact_DAO_Contact',
1003 'label' => ts("Created By"),
1008 'name' => 'created_date',
1009 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1010 'title' => ts('Contribution Page Created Date'),
1011 'description' => ts('Date and time that contribution page was created.'),
1012 'where' => 'civicrm_contribution_page.created_date',
1013 'table_name' => 'civicrm_contribution_page',
1014 'entity' => 'ContributionPage',
1015 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1020 'name' => 'currency',
1021 'type' => CRM_Utils_Type
::T_STRING
,
1022 'title' => ts('Contribution Page Currency'),
1023 'description' => ts('3 character string, value from config setting or input via user.'),
1025 'size' => CRM_Utils_Type
::FOUR
,
1026 'where' => 'civicrm_contribution_page.currency',
1027 'headerPattern' => '/cur(rency)?/i',
1028 'dataPattern' => '/^[A-Z]{3}$/i',
1029 'default' => 'NULL',
1030 'table_name' => 'civicrm_contribution_page',
1031 'entity' => 'ContributionPage',
1032 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1037 'pseudoconstant' => [
1038 'table' => 'civicrm_currency',
1039 'keyColumn' => 'name',
1040 'labelColumn' => 'full_name',
1041 'nameColumn' => 'name',
1042 'abbrColumn' => 'symbol',
1047 'name' => 'campaign_id',
1048 'type' => CRM_Utils_Type
::T_INT
,
1049 'title' => ts('Campaign ID'),
1050 'description' => ts('The campaign for which we are collecting contributions with this page.'),
1051 'where' => 'civicrm_contribution_page.campaign_id',
1052 'table_name' => 'civicrm_contribution_page',
1053 'entity' => 'ContributionPage',
1054 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1056 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1057 'component' => 'CiviCampaign',
1059 'type' => 'EntityRef',
1060 'label' => ts("Campaign"),
1065 'name' => 'is_share',
1066 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1067 'title' => ts('Is Contribution Page Shared?'),
1068 'description' => ts('Can people share the contribution page through social media?'),
1069 'where' => 'civicrm_contribution_page.is_share',
1071 'table_name' => 'civicrm_contribution_page',
1072 'entity' => 'ContributionPage',
1073 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1077 'is_billing_required' => [
1078 'name' => 'is_billing_required',
1079 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1080 'title' => ts('Is billing block required'),
1081 'description' => ts('if true - billing block is required for online contribution page'),
1082 'where' => 'civicrm_contribution_page.is_billing_required',
1084 'table_name' => 'civicrm_contribution_page',
1085 'entity' => 'ContributionPage',
1086 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1090 'contribution_page_frontend_title' => [
1091 'name' => 'frontend_title',
1092 'type' => CRM_Utils_Type
::T_STRING
,
1093 'title' => ts('Public Title'),
1094 'description' => ts('Contribution Page Public title'),
1096 'size' => CRM_Utils_Type
::HUGE
,
1097 'where' => 'civicrm_contribution_page.frontend_title',
1098 'default' => 'NULL',
1099 'table_name' => 'civicrm_contribution_page',
1100 'entity' => 'ContributionPage',
1101 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1109 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1111 return Civi
::$statics[__CLASS__
]['fields'];
1115 * Return a mapping from field-name to the corresponding key (as used in fields()).
1118 * Array(string $name => string $uniqueName).
1120 public static function &fieldKeys() {
1121 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1122 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1124 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1128 * Returns the names of this table
1132 public static function getTableName() {
1133 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1137 * Returns if this table needs to be logged
1141 public function getLog() {
1146 * Returns the list of fields that can be imported
1148 * @param bool $prefix
1152 public static function &import($prefix = FALSE) {
1153 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1158 * Returns the list of fields that can be exported
1160 * @param bool $prefix
1164 public static function &export($prefix = FALSE) {
1165 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1170 * Returns the list of indices
1172 * @param bool $localize
1176 public static function indices($localize = TRUE) {
1178 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;