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:e33f9a31d9be56f20e20c753313478d1)
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;
44 * @var int|string|null
45 * (SQL type: int unsigned)
46 * Note that values will be retrieved from the database as a string.
51 * Contribution Page title. For top of page display
54 * (SQL type: varchar(255))
55 * Note that values will be retrieved from the database as a string.
60 * Text and html allowed. Displayed below title.
64 * Note that values will be retrieved from the database as a string.
69 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
71 * @var int|string|null
72 * (SQL type: int unsigned)
73 * Note that values will be retrieved from the database as a string.
75 public $financial_type_id;
78 * Payment Processors configured for this contribution Page
81 * (SQL type: varchar(128))
82 * Note that values will be retrieved from the database as a string.
84 public $payment_processor;
87 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
89 * @var bool|string|null
91 * Note that values will be retrieved from the database as a string.
93 public $is_credit_card_only;
96 * if true - allows real-time monetary transactions otherwise non-monetary transactions
98 * @var bool|string|null
100 * Note that values will be retrieved from the database as a string.
105 * if true - allows recurring contributions, valid only for PayPal_Standard
107 * @var bool|string|null
108 * (SQL type: tinyint)
109 * Note that values will be retrieved from the database as a string.
114 * if false, the confirm page in contribution pages gets skipped
116 * @var bool|string|null
117 * (SQL type: tinyint)
118 * Note that values will be retrieved from the database as a string.
120 public $is_confirm_enabled;
123 * Supported recurring frequency units.
126 * (SQL type: varchar(128))
127 * Note that values will be retrieved from the database as a string.
129 public $recur_frequency_unit;
132 * if true - supports recurring intervals
134 * @var bool|string|null
135 * (SQL type: tinyint)
136 * Note that values will be retrieved from the database as a string.
138 public $is_recur_interval;
141 * if true - asks user for recurring installments
143 * @var bool|string|null
144 * (SQL type: tinyint)
145 * Note that values will be retrieved from the database as a string.
147 public $is_recur_installments;
150 * if true - user is able to adjust payment start date
152 * @var bool|string|null
153 * (SQL type: tinyint)
154 * Note that values will be retrieved from the database as a string.
156 public $adjust_recur_start_date;
159 * if true - allows the user to send payment directly to the org later
161 * @var bool|string|null
162 * (SQL type: tinyint)
163 * Note that values will be retrieved from the database as a string.
165 public $is_pay_later;
168 * The text displayed to the user in the main form
172 * Note that values will be retrieved from the database as a string.
174 public $pay_later_text;
177 * The receipt sent to the user instead of the normal receipt text
181 * Note that values will be retrieved from the database as a string.
183 public $pay_later_receipt;
186 * is partial payment enabled for this online contribution page
188 * @var bool|string|null
189 * (SQL type: tinyint)
190 * Note that values will be retrieved from the database as a string.
192 public $is_partial_payment;
195 * Initial amount label for partial payment
198 * (SQL type: varchar(255))
199 * Note that values will be retrieved from the database as a string.
201 public $initial_amount_label;
204 * Initial amount help text for partial payment
208 * Note that values will be retrieved from the database as a string.
210 public $initial_amount_help_text;
213 * Minimum initial amount for partial payment
215 * @var float|string|null
216 * (SQL type: decimal(20,2))
217 * Note that values will be retrieved from the database as a string.
219 public $min_initial_amount;
222 * if true, page will include an input text field where user can enter their own amount
224 * @var bool|string|null
225 * (SQL type: tinyint)
226 * Note that values will be retrieved from the database as a string.
228 public $is_allow_other_amount;
231 * FK to civicrm_option_value.
233 * @var int|string|null
234 * (SQL type: int unsigned)
235 * Note that values will be retrieved from the database as a string.
237 public $default_amount_id;
240 * if other amounts allowed, user can configure minimum allowed.
242 * @var float|string|null
243 * (SQL type: decimal(20,2))
244 * Note that values will be retrieved from the database as a string.
249 * if other amounts allowed, user can configure maximum allowed.
251 * @var float|string|null
252 * (SQL type: decimal(20,2))
253 * Note that values will be retrieved from the database as a string.
258 * The target goal for this page, allows people to build a goal meter
260 * @var float|string|null
261 * (SQL type: decimal(20,2))
262 * Note that values will be retrieved from the database as a string.
267 * Title for Thank-you page (header title tag, and display at the top of the page).
270 * (SQL type: varchar(255))
271 * Note that values will be retrieved from the database as a string.
273 public $thankyou_title;
276 * text and html allowed. displayed above result on success page
280 * Note that values will be retrieved from the database as a string.
282 public $thankyou_text;
285 * 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.
289 * Note that values will be retrieved from the database as a string.
291 public $thankyou_footer;
294 * if true, receipt is automatically emailed to contact on success
296 * @var bool|string|null
297 * (SQL type: tinyint)
298 * Note that values will be retrieved from the database as a string.
300 public $is_email_receipt;
303 * FROM email name used for receipts generated by contributions to this contribution page.
306 * (SQL type: varchar(255))
307 * Note that values will be retrieved from the database as a string.
309 public $receipt_from_name;
312 * FROM email address used for receipts generated by contributions to this contribution page.
315 * (SQL type: varchar(255))
316 * Note that values will be retrieved from the database as a string.
318 public $receipt_from_email;
321 * comma-separated list of email addresses to cc each time a receipt is sent
324 * (SQL type: varchar(255))
325 * Note that values will be retrieved from the database as a string.
330 * comma-separated list of email addresses to bcc each time a receipt is sent
333 * (SQL type: varchar(255))
334 * Note that values will be retrieved from the database as a string.
339 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
343 * Note that values will be retrieved from the database as a string.
345 public $receipt_text;
348 * Is this property active?
350 * @var bool|string|null
351 * (SQL type: tinyint)
352 * Note that values will be retrieved from the database as a string.
357 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
361 * Note that values will be retrieved from the database as a string.
366 * Is this property active?
368 * @var bool|string|null
369 * (SQL type: tinyint)
370 * Note that values will be retrieved from the database as a string.
372 public $amount_block_is_active;
375 * Date and time that this page starts.
378 * (SQL type: datetime)
379 * Note that values will be retrieved from the database as a string.
384 * Date and time that this page ends. May be NULL if no defined end date/time
387 * (SQL type: datetime)
388 * Note that values will be retrieved from the database as a string.
393 * FK to civicrm_contact, who created this contribution page
395 * @var int|string|null
396 * (SQL type: int unsigned)
397 * Note that values will be retrieved from the database as a string.
402 * Date and time that contribution page was created.
405 * (SQL type: datetime)
406 * Note that values will be retrieved from the database as a string.
408 public $created_date;
411 * 3 character string, value from config setting or input via user.
414 * (SQL type: varchar(3))
415 * Note that values will be retrieved from the database as a string.
420 * The campaign for which we are collecting contributions with this page.
422 * @var int|string|null
423 * (SQL type: int unsigned)
424 * Note that values will be retrieved from the database as a string.
429 * Can people share the contribution page through social media?
431 * @var bool|string|null
432 * (SQL type: tinyint)
433 * Note that values will be retrieved from the database as a string.
438 * if true - billing block is required for online contribution page
440 * @var bool|string|null
441 * (SQL type: tinyint)
442 * Note that values will be retrieved from the database as a string.
444 public $is_billing_required;
447 * Contribution Page Public title
450 * (SQL type: varchar(255))
451 * Note that values will be retrieved from the database as a string.
453 public $frontend_title;
458 public function __construct() {
459 $this->__table
= 'civicrm_contribution_page';
460 parent
::__construct();
464 * Returns localized title of this entity.
466 * @param bool $plural
467 * Whether to return the plural version of the title.
469 public static function getEntityTitle($plural = FALSE) {
470 return $plural ?
ts('Contribution Pages') : ts('Contribution Page');
474 * Returns foreign keys and entity references.
477 * [CRM_Core_Reference_Interface]
479 public static function getReferenceColumns() {
480 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
481 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
482 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
483 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
484 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
485 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
487 return Civi
::$statics[__CLASS__
]['links'];
491 * Returns all the column names of this table
495 public static function &fields() {
496 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
497 Civi
::$statics[__CLASS__
]['fields'] = [
500 'type' => CRM_Utils_Type
::T_INT
,
501 'title' => ts('Contribution Page ID'),
502 'description' => ts('Contribution ID'),
504 'where' => 'civicrm_contribution_page.id',
505 'table_name' => 'civicrm_contribution_page',
506 'entity' => 'ContributionPage',
507 'bao' => 'CRM_Contribute_BAO_ContributionPage',
517 'type' => CRM_Utils_Type
::T_STRING
,
518 'title' => ts('Contribution Page Title'),
519 'description' => ts('Contribution Page title. For top of page display'),
521 'size' => CRM_Utils_Type
::HUGE
,
522 'where' => 'civicrm_contribution_page.title',
523 'table_name' => 'civicrm_contribution_page',
524 'entity' => 'ContributionPage',
525 'bao' => 'CRM_Contribute_BAO_ContributionPage',
530 'name' => 'intro_text',
531 'type' => CRM_Utils_Type
::T_TEXT
,
532 'title' => ts('Contribution Page Introduction Text'),
533 'description' => ts('Text and html allowed. Displayed below title.'),
536 'where' => 'civicrm_contribution_page.intro_text',
537 'table_name' => 'civicrm_contribution_page',
538 'entity' => 'ContributionPage',
539 'bao' => 'CRM_Contribute_BAO_ContributionPage',
542 'type' => 'RichTextEditor',
546 'financial_type_id' => [
547 'name' => 'financial_type_id',
548 'type' => CRM_Utils_Type
::T_INT
,
549 'title' => ts('Financial Type ID'),
550 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'),
551 'where' => 'civicrm_contribution_page.financial_type_id',
552 'table_name' => 'civicrm_contribution_page',
553 'entity' => 'ContributionPage',
554 'bao' => 'CRM_Contribute_BAO_ContributionPage',
556 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
559 'label' => ts("Financial Type"),
561 'pseudoconstant' => [
562 'table' => 'civicrm_financial_type',
564 'labelColumn' => 'name',
568 'payment_processor' => [
569 'name' => 'payment_processor',
570 'type' => CRM_Utils_Type
::T_STRING
,
571 'title' => ts('Payment Processor'),
572 'description' => ts('Payment Processors configured for this contribution Page'),
574 'size' => CRM_Utils_Type
::HUGE
,
575 'where' => 'civicrm_contribution_page.payment_processor',
576 'table_name' => 'civicrm_contribution_page',
577 'entity' => 'ContributionPage',
578 'bao' => 'CRM_Contribute_BAO_ContributionPage',
580 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
583 'label' => ts("Payment Processors"),
585 'pseudoconstant' => [
586 'table' => 'civicrm_payment_processor',
588 'labelColumn' => 'name',
592 'is_credit_card_only' => [
593 'name' => 'is_credit_card_only',
594 'type' => CRM_Utils_Type
::T_BOOLEAN
,
595 'title' => ts('Is Credit Card Only?'),
596 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'),
597 'where' => 'civicrm_contribution_page.is_credit_card_only',
599 'table_name' => 'civicrm_contribution_page',
600 'entity' => 'ContributionPage',
601 'bao' => 'CRM_Contribute_BAO_ContributionPage',
606 'name' => 'is_monetary',
607 'type' => CRM_Utils_Type
::T_BOOLEAN
,
608 'title' => ts('Is Monetary'),
609 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'),
610 'where' => 'civicrm_contribution_page.is_monetary',
612 'table_name' => 'civicrm_contribution_page',
613 'entity' => 'ContributionPage',
614 'bao' => 'CRM_Contribute_BAO_ContributionPage',
619 'name' => 'is_recur',
620 'type' => CRM_Utils_Type
::T_BOOLEAN
,
621 'title' => ts('Is Recurring'),
622 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'),
623 'where' => 'civicrm_contribution_page.is_recur',
625 'table_name' => 'civicrm_contribution_page',
626 'entity' => 'ContributionPage',
627 'bao' => 'CRM_Contribute_BAO_ContributionPage',
631 'is_confirm_enabled' => [
632 'name' => 'is_confirm_enabled',
633 'type' => CRM_Utils_Type
::T_BOOLEAN
,
634 'title' => ts('Confirmation Page?'),
635 'description' => ts('if false, the confirm page in contribution pages gets skipped'),
636 'where' => 'civicrm_contribution_page.is_confirm_enabled',
638 'table_name' => 'civicrm_contribution_page',
639 'entity' => 'ContributionPage',
640 'bao' => 'CRM_Contribute_BAO_ContributionPage',
644 'recur_frequency_unit' => [
645 'name' => 'recur_frequency_unit',
646 'type' => CRM_Utils_Type
::T_STRING
,
647 'title' => ts('Recurring Frequency'),
648 'description' => ts('Supported recurring frequency units.'),
650 'size' => CRM_Utils_Type
::HUGE
,
651 'where' => 'civicrm_contribution_page.recur_frequency_unit',
652 'table_name' => 'civicrm_contribution_page',
653 'entity' => 'ContributionPage',
654 'bao' => 'CRM_Contribute_BAO_ContributionPage',
656 'serialize' => self
::SERIALIZE_SEPARATOR_TRIMMED
,
660 'pseudoconstant' => [
661 'optionGroupName' => 'recur_frequency_units',
662 'keyColumn' => 'name',
663 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
667 'is_recur_interval' => [
668 'name' => 'is_recur_interval',
669 'type' => CRM_Utils_Type
::T_BOOLEAN
,
670 'title' => ts('Support Recurring Intervals'),
671 'description' => ts('if true - supports recurring intervals'),
672 'where' => 'civicrm_contribution_page.is_recur_interval',
674 'table_name' => 'civicrm_contribution_page',
675 'entity' => 'ContributionPage',
676 'bao' => 'CRM_Contribute_BAO_ContributionPage',
680 'is_recur_installments' => [
681 'name' => 'is_recur_installments',
682 'type' => CRM_Utils_Type
::T_BOOLEAN
,
683 'title' => ts('Recurring Installments?'),
684 'description' => ts('if true - asks user for recurring installments'),
685 'where' => 'civicrm_contribution_page.is_recur_installments',
687 'table_name' => 'civicrm_contribution_page',
688 'entity' => 'ContributionPage',
689 'bao' => 'CRM_Contribute_BAO_ContributionPage',
693 'adjust_recur_start_date' => [
694 'name' => 'adjust_recur_start_date',
695 'type' => CRM_Utils_Type
::T_BOOLEAN
,
696 'title' => ts('Adjust Recurring Start Date'),
697 'description' => ts('if true - user is able to adjust payment start date'),
698 'where' => 'civicrm_contribution_page.adjust_recur_start_date',
700 'table_name' => 'civicrm_contribution_page',
701 'entity' => 'ContributionPage',
702 'bao' => 'CRM_Contribute_BAO_ContributionPage',
707 'name' => 'is_pay_later',
708 'type' => CRM_Utils_Type
::T_BOOLEAN
,
709 'title' => ts('Pay Later'),
710 'description' => ts('if true - allows the user to send payment directly to the org later'),
711 'where' => 'civicrm_contribution_page.is_pay_later',
713 'table_name' => 'civicrm_contribution_page',
714 'entity' => 'ContributionPage',
715 'bao' => 'CRM_Contribute_BAO_ContributionPage',
719 'pay_later_text' => [
720 'name' => 'pay_later_text',
721 'type' => CRM_Utils_Type
::T_TEXT
,
722 'title' => ts('Pay Later Text'),
723 'description' => ts('The text displayed to the user in the main form'),
724 'where' => 'civicrm_contribution_page.pay_later_text',
725 'table_name' => 'civicrm_contribution_page',
726 'entity' => 'ContributionPage',
727 'bao' => 'CRM_Contribute_BAO_ContributionPage',
731 'pay_later_receipt' => [
732 'name' => 'pay_later_receipt',
733 'type' => CRM_Utils_Type
::T_TEXT
,
734 'title' => ts('Pay Later Receipt'),
735 'description' => ts('The receipt sent to the user instead of the normal receipt text'),
736 'where' => 'civicrm_contribution_page.pay_later_receipt',
737 'table_name' => 'civicrm_contribution_page',
738 'entity' => 'ContributionPage',
739 'bao' => 'CRM_Contribute_BAO_ContributionPage',
743 'is_partial_payment' => [
744 'name' => 'is_partial_payment',
745 'type' => CRM_Utils_Type
::T_BOOLEAN
,
746 'title' => ts('Allow Partial Payment'),
747 'description' => ts('is partial payment enabled for this online contribution page'),
748 'where' => 'civicrm_contribution_page.is_partial_payment',
750 'table_name' => 'civicrm_contribution_page',
751 'entity' => 'ContributionPage',
752 'bao' => 'CRM_Contribute_BAO_ContributionPage',
756 'initial_amount_label' => [
757 'name' => 'initial_amount_label',
758 'type' => CRM_Utils_Type
::T_STRING
,
759 'title' => ts('Initial Amount Label'),
760 'description' => ts('Initial amount label for partial payment'),
762 'size' => CRM_Utils_Type
::HUGE
,
763 'where' => 'civicrm_contribution_page.initial_amount_label',
764 'table_name' => 'civicrm_contribution_page',
765 'entity' => 'ContributionPage',
766 'bao' => 'CRM_Contribute_BAO_ContributionPage',
769 'label' => ts("Initial Amount Label"),
773 'initial_amount_help_text' => [
774 'name' => 'initial_amount_help_text',
775 'type' => CRM_Utils_Type
::T_TEXT
,
776 'title' => ts('Initial Amount Help Text'),
777 'description' => ts('Initial amount help text for partial payment'),
778 'where' => 'civicrm_contribution_page.initial_amount_help_text',
779 'table_name' => 'civicrm_contribution_page',
780 'entity' => 'ContributionPage',
781 'bao' => 'CRM_Contribute_BAO_ContributionPage',
784 'label' => ts("Initial Amount Help Text"),
788 'min_initial_amount' => [
789 'name' => 'min_initial_amount',
790 'type' => CRM_Utils_Type
::T_MONEY
,
791 'title' => ts('Min Initial Amount'),
792 'description' => ts('Minimum initial amount for partial payment'),
797 'where' => 'civicrm_contribution_page.min_initial_amount',
798 'table_name' => 'civicrm_contribution_page',
799 'entity' => 'ContributionPage',
800 'bao' => 'CRM_Contribute_BAO_ContributionPage',
803 'label' => ts("Min. Initial Amount"),
807 'is_allow_other_amount' => [
808 'name' => 'is_allow_other_amount',
809 'type' => CRM_Utils_Type
::T_BOOLEAN
,
810 'title' => ts('Allow Other Amounts'),
811 'description' => ts('if true, page will include an input text field where user can enter their own amount'),
812 'where' => 'civicrm_contribution_page.is_allow_other_amount',
814 'table_name' => 'civicrm_contribution_page',
815 'entity' => 'ContributionPage',
816 'bao' => 'CRM_Contribute_BAO_ContributionPage',
820 'default_amount_id' => [
821 'name' => 'default_amount_id',
822 'type' => CRM_Utils_Type
::T_INT
,
823 'title' => ts('Default Amount'),
824 'description' => ts('FK to civicrm_option_value.'),
825 'where' => 'civicrm_contribution_page.default_amount_id',
826 'table_name' => 'civicrm_contribution_page',
827 'entity' => 'ContributionPage',
828 'bao' => 'CRM_Contribute_BAO_ContributionPage',
833 'name' => 'min_amount',
834 'type' => CRM_Utils_Type
::T_MONEY
,
835 'title' => ts('Minimum Amount'),
836 'description' => ts('if other amounts allowed, user can configure minimum allowed.'),
841 'where' => 'civicrm_contribution_page.min_amount',
842 'table_name' => 'civicrm_contribution_page',
843 'entity' => 'ContributionPage',
844 'bao' => 'CRM_Contribute_BAO_ContributionPage',
849 'name' => 'max_amount',
850 'type' => CRM_Utils_Type
::T_MONEY
,
851 'title' => ts('Maximum Amount'),
852 'description' => ts('if other amounts allowed, user can configure maximum allowed.'),
857 'where' => 'civicrm_contribution_page.max_amount',
858 'table_name' => 'civicrm_contribution_page',
859 'entity' => 'ContributionPage',
860 'bao' => 'CRM_Contribute_BAO_ContributionPage',
865 'name' => 'goal_amount',
866 'type' => CRM_Utils_Type
::T_MONEY
,
867 'title' => ts('Goal Amount'),
868 'description' => ts('The target goal for this page, allows people to build a goal meter'),
873 'where' => 'civicrm_contribution_page.goal_amount',
874 'table_name' => 'civicrm_contribution_page',
875 'entity' => 'ContributionPage',
876 'bao' => 'CRM_Contribute_BAO_ContributionPage',
879 'label' => ts("Goal Amount"),
883 'thankyou_title' => [
884 'name' => 'thankyou_title',
885 'type' => CRM_Utils_Type
::T_STRING
,
886 'title' => ts('Thank-you Title'),
887 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'),
889 'size' => CRM_Utils_Type
::HUGE
,
890 'where' => 'civicrm_contribution_page.thankyou_title',
891 'table_name' => 'civicrm_contribution_page',
892 'entity' => 'ContributionPage',
893 'bao' => 'CRM_Contribute_BAO_ContributionPage',
898 'name' => 'thankyou_text',
899 'type' => CRM_Utils_Type
::T_TEXT
,
900 'title' => ts('Thank-you Text'),
901 'description' => ts('text and html allowed. displayed above result on success page'),
904 'where' => 'civicrm_contribution_page.thankyou_text',
905 'table_name' => 'civicrm_contribution_page',
906 'entity' => 'ContributionPage',
907 'bao' => 'CRM_Contribute_BAO_ContributionPage',
910 'type' => 'RichTextEditor',
914 'thankyou_footer' => [
915 'name' => 'thankyou_footer',
916 'type' => CRM_Utils_Type
::T_TEXT
,
917 'title' => ts('Thank-you Footer'),
918 '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.'),
921 'where' => 'civicrm_contribution_page.thankyou_footer',
922 'table_name' => 'civicrm_contribution_page',
923 'entity' => 'ContributionPage',
924 'bao' => 'CRM_Contribute_BAO_ContributionPage',
927 'type' => 'RichTextEditor',
931 'is_email_receipt' => [
932 'name' => 'is_email_receipt',
933 'type' => CRM_Utils_Type
::T_BOOLEAN
,
934 'title' => ts('Send email Receipt'),
935 'description' => ts('if true, receipt is automatically emailed to contact on success'),
936 'where' => 'civicrm_contribution_page.is_email_receipt',
938 'table_name' => 'civicrm_contribution_page',
939 'entity' => 'ContributionPage',
940 'bao' => 'CRM_Contribute_BAO_ContributionPage',
944 'receipt_from_name' => [
945 'name' => 'receipt_from_name',
946 'type' => CRM_Utils_Type
::T_STRING
,
947 'title' => ts('Receipt From'),
948 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'),
950 'size' => CRM_Utils_Type
::HUGE
,
951 'where' => 'civicrm_contribution_page.receipt_from_name',
952 'table_name' => 'civicrm_contribution_page',
953 'entity' => 'ContributionPage',
954 'bao' => 'CRM_Contribute_BAO_ContributionPage',
958 'receipt_from_email' => [
959 'name' => 'receipt_from_email',
960 'type' => CRM_Utils_Type
::T_STRING
,
961 'title' => ts('Receipt From email'),
962 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'),
964 'size' => CRM_Utils_Type
::HUGE
,
965 'where' => 'civicrm_contribution_page.receipt_from_email',
966 'table_name' => 'civicrm_contribution_page',
967 'entity' => 'ContributionPage',
968 'bao' => 'CRM_Contribute_BAO_ContributionPage',
973 'name' => 'cc_receipt',
974 'type' => CRM_Utils_Type
::T_STRING
,
975 'title' => ts('Receipt cc'),
976 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'),
978 'size' => CRM_Utils_Type
::HUGE
,
979 'where' => 'civicrm_contribution_page.cc_receipt',
980 'table_name' => 'civicrm_contribution_page',
981 'entity' => 'ContributionPage',
982 'bao' => 'CRM_Contribute_BAO_ContributionPage',
987 'name' => 'bcc_receipt',
988 'type' => CRM_Utils_Type
::T_STRING
,
989 'title' => ts('Receipt bcc'),
990 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'),
992 'size' => CRM_Utils_Type
::HUGE
,
993 'where' => 'civicrm_contribution_page.bcc_receipt',
994 'table_name' => 'civicrm_contribution_page',
995 'entity' => 'ContributionPage',
996 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1001 'name' => 'receipt_text',
1002 'type' => CRM_Utils_Type
::T_TEXT
,
1003 'title' => ts('Receipt Text'),
1004 'description' => ts('text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now'),
1007 'where' => 'civicrm_contribution_page.receipt_text',
1008 'table_name' => 'civicrm_contribution_page',
1009 'entity' => 'ContributionPage',
1010 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1013 'type' => 'TextArea',
1018 'name' => 'is_active',
1019 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1020 'title' => ts('Is Page Active?'),
1021 'description' => ts('Is this property active?'),
1022 'where' => 'civicrm_contribution_page.is_active',
1023 'table_name' => 'civicrm_contribution_page',
1024 'entity' => 'ContributionPage',
1025 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1030 'name' => 'footer_text',
1031 'type' => CRM_Utils_Type
::T_TEXT
,
1032 'title' => ts('Footer Text'),
1033 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'),
1036 'where' => 'civicrm_contribution_page.footer_text',
1037 'table_name' => 'civicrm_contribution_page',
1038 'entity' => 'ContributionPage',
1039 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1042 'type' => 'RichTextEditor',
1046 'amount_block_is_active' => [
1047 'name' => 'amount_block_is_active',
1048 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1049 'title' => ts('Is Amount Block Active?'),
1050 'description' => ts('Is this property active?'),
1051 'where' => 'civicrm_contribution_page.amount_block_is_active',
1053 'table_name' => 'civicrm_contribution_page',
1054 'entity' => 'ContributionPage',
1055 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1060 'name' => 'start_date',
1061 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1062 'title' => ts('Contribution Page Start Date'),
1063 'description' => ts('Date and time that this page starts.'),
1064 'where' => 'civicrm_contribution_page.start_date',
1065 'table_name' => 'civicrm_contribution_page',
1066 'entity' => 'ContributionPage',
1067 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1072 'name' => 'end_date',
1073 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1074 'title' => ts('Contribution Page End Date'),
1075 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'),
1076 'where' => 'civicrm_contribution_page.end_date',
1077 'table_name' => 'civicrm_contribution_page',
1078 'entity' => 'ContributionPage',
1079 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1084 'name' => 'created_id',
1085 'type' => CRM_Utils_Type
::T_INT
,
1086 'title' => ts('Created By Contact ID'),
1087 'description' => ts('FK to civicrm_contact, who created this contribution page'),
1088 'where' => 'civicrm_contribution_page.created_id',
1089 'table_name' => 'civicrm_contribution_page',
1090 'entity' => 'ContributionPage',
1091 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1093 'FKClassName' => 'CRM_Contact_DAO_Contact',
1095 'label' => ts("Created By"),
1100 'name' => 'created_date',
1101 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
1102 'title' => ts('Contribution Page Created Date'),
1103 'description' => ts('Date and time that contribution page was created.'),
1104 'where' => 'civicrm_contribution_page.created_date',
1105 'table_name' => 'civicrm_contribution_page',
1106 'entity' => 'ContributionPage',
1107 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1112 'name' => 'currency',
1113 'type' => CRM_Utils_Type
::T_STRING
,
1114 'title' => ts('Contribution Page Currency'),
1115 'description' => ts('3 character string, value from config setting or input via user.'),
1117 'size' => CRM_Utils_Type
::FOUR
,
1118 'where' => 'civicrm_contribution_page.currency',
1119 'headerPattern' => '/cur(rency)?/i',
1120 'dataPattern' => '/^[A-Z]{3}$/i',
1122 'table_name' => 'civicrm_contribution_page',
1123 'entity' => 'ContributionPage',
1124 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1129 'pseudoconstant' => [
1130 'table' => 'civicrm_currency',
1131 'keyColumn' => 'name',
1132 'labelColumn' => 'full_name',
1133 'nameColumn' => 'name',
1134 'abbrColumn' => 'symbol',
1139 'name' => 'campaign_id',
1140 'type' => CRM_Utils_Type
::T_INT
,
1141 'title' => ts('Campaign ID'),
1142 'description' => ts('The campaign for which we are collecting contributions with this page.'),
1143 'where' => 'civicrm_contribution_page.campaign_id',
1144 'table_name' => 'civicrm_contribution_page',
1145 'entity' => 'ContributionPage',
1146 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1148 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
1149 'component' => 'CiviCampaign',
1151 'type' => 'EntityRef',
1152 'label' => ts("Campaign"),
1154 'pseudoconstant' => [
1155 'table' => 'civicrm_campaign',
1156 'keyColumn' => 'id',
1157 'labelColumn' => 'title',
1158 'prefetch' => 'FALSE',
1163 'name' => 'is_share',
1164 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1165 'title' => ts('Is Contribution Page Shared?'),
1166 'description' => ts('Can people share the contribution page through social media?'),
1167 'where' => 'civicrm_contribution_page.is_share',
1169 'table_name' => 'civicrm_contribution_page',
1170 'entity' => 'ContributionPage',
1171 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1175 'is_billing_required' => [
1176 'name' => 'is_billing_required',
1177 'type' => CRM_Utils_Type
::T_BOOLEAN
,
1178 'title' => ts('Is billing block required'),
1179 'description' => ts('if true - billing block is required for online contribution page'),
1180 'where' => 'civicrm_contribution_page.is_billing_required',
1182 'table_name' => 'civicrm_contribution_page',
1183 'entity' => 'ContributionPage',
1184 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1188 'contribution_page_frontend_title' => [
1189 'name' => 'frontend_title',
1190 'type' => CRM_Utils_Type
::T_STRING
,
1191 'title' => ts('Public Title'),
1192 'description' => ts('Contribution Page Public title'),
1194 'size' => CRM_Utils_Type
::HUGE
,
1195 'where' => 'civicrm_contribution_page.frontend_title',
1197 'table_name' => 'civicrm_contribution_page',
1198 'entity' => 'ContributionPage',
1199 'bao' => 'CRM_Contribute_BAO_ContributionPage',
1207 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
1209 return Civi
::$statics[__CLASS__
]['fields'];
1213 * Return a mapping from field-name to the corresponding key (as used in fields()).
1216 * Array(string $name => string $uniqueName).
1218 public static function &fieldKeys() {
1219 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
1220 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
1222 return Civi
::$statics[__CLASS__
]['fieldKeys'];
1226 * Returns the names of this table
1230 public static function getTableName() {
1231 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
1235 * Returns if this table needs to be logged
1239 public function getLog() {
1244 * Returns the list of fields that can be imported
1246 * @param bool $prefix
1250 public static function &import($prefix = FALSE) {
1251 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, []);
1256 * Returns the list of fields that can be exported
1258 * @param bool $prefix
1262 public static function &export($prefix = FALSE) {
1263 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, []);
1268 * Returns the list of indices
1270 * @param bool $localize
1274 public static function indices($localize = TRUE) {
1276 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;