3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2016
31 * Generated from xml/schema/CRM/Contribute/ContributionPage.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:4948188e5ba353c75f5c3fe00e67a5ea)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Contribute_DAO_ContributionPage
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_contribution_page';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
76 * Contribution Page title. For top of page display
82 * Text and html allowed. Displayed below title.
88 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
92 public $financial_type_id;
94 * Payment Processors configured for this contribution Page
98 public $payment_processor;
100 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
104 public $is_credit_card_only;
106 * if true - allows real-time monetary transactions otherwise non-monetary transactions
112 * if true - allows recurring contributions, valid only for PayPal_Standard
118 * if false, the confirm page in contribution pages gets skipped
122 public $is_confirm_enabled;
124 * Supported recurring frequency units.
128 public $recur_frequency_unit;
130 * if true - supports recurring intervals
134 public $is_recur_interval;
136 * if true - asks user for recurring installments
140 public $is_recur_installments;
142 * if true - user is able to adjust payment start date
146 public $adjust_recur_start_date;
148 * if true - allows the user to send payment directly to the org later
152 public $is_pay_later;
154 * The text displayed to the user in the main form
158 public $pay_later_text;
160 * The receipt sent to the user instead of the normal receipt text
164 public $pay_later_receipt;
166 * is partial payment enabled for this online contribution page
170 public $is_partial_payment;
172 * Initial amount label for partial payment
176 public $initial_amount_label;
178 * Initial amount help text for partial payment
182 public $initial_amount_help_text;
184 * Minimum initial amount for partial payment
188 public $min_initial_amount;
190 * if true, page will include an input text field where user can enter their own amount
194 public $is_allow_other_amount;
196 * FK to civicrm_option_value.
200 public $default_amount_id;
202 * if other amounts allowed, user can configure minimum allowed.
208 * if other amounts allowed, user can configure maximum allowed.
214 * The target goal for this page, allows people to build a goal meter
220 * Title for Thank-you page (header title tag, and display at the top of the page).
224 public $thankyou_title;
226 * text and html allowed. displayed above result on success page
230 public $thankyou_text;
232 * 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.
236 public $thankyou_footer;
238 * if true, receipt is automatically emailed to contact on success
242 public $is_email_receipt;
244 * FROM email name used for receipts generated by contributions to this contribution page.
248 public $receipt_from_name;
250 * FROM email address used for receipts generated by contributions to this contribution page.
254 public $receipt_from_email;
256 * comma-separated list of email addresses to cc each time a receipt is sent
262 * comma-separated list of email addresses to bcc each time a receipt is sent
268 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
272 public $receipt_text;
274 * Is this property active?
280 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
286 * Is this property active?
290 public $amount_block_is_active;
292 * Date and time that this page starts.
298 * Date and time that this page ends. May be NULL if no defined end date/time
304 * FK to civicrm_contact, who created this contribution page
310 * Date and time that contribution page was created.
314 public $created_date;
316 * 3 character string, value from config setting or input via user.
322 * The campaign for which we are collecting contributions with this page.
328 * Can people share the contribution page through social media?
334 * if true - billing block is required for online contribution page
338 public $is_billing_required;
342 * @return civicrm_contribution_page
344 function __construct() {
345 $this->__table
= 'civicrm_contribution_page';
346 parent
::__construct();
349 * Returns foreign keys and entity references
352 * [CRM_Core_Reference_Interface]
354 static function getReferenceColumns() {
355 if (!self
::$_links) {
356 self
::$_links = static ::createReferenceColumns(__CLASS__
);
357 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
358 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
359 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
361 return self
::$_links;
364 * Returns all the column names of this table
368 static function &fields() {
369 if (!(self
::$_fields)) {
370 self
::$_fields = array(
373 'type' => CRM_Utils_Type
::T_INT
,
374 'title' => ts('Contribution Page ID') ,
375 'description' => 'Contribution Id',
380 'type' => CRM_Utils_Type
::T_STRING
,
381 'title' => ts('Contribution Page Title') ,
382 'description' => 'Contribution Page title. For top of page display',
384 'size' => CRM_Utils_Type
::HUGE
,
386 'intro_text' => array(
387 'name' => 'intro_text',
388 'type' => CRM_Utils_Type
::T_TEXT
,
389 'title' => ts('Contribution Page Introduction Text') ,
390 'description' => 'Text and html allowed. Displayed below title.',
394 'type' => 'RichTextEditor',
397 'financial_type_id' => array(
398 'name' => 'financial_type_id',
399 'type' => CRM_Utils_Type
::T_INT
,
400 'title' => ts('Financial Type') ,
401 'description' => 'default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
402 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
406 'pseudoconstant' => array(
407 'table' => 'civicrm_financial_type',
409 'labelColumn' => 'name',
412 'payment_processor' => array(
413 'name' => 'payment_processor',
414 'type' => CRM_Utils_Type
::T_STRING
,
415 'title' => ts('Payment Processor') ,
416 'description' => 'Payment Processors configured for this contribution Page',
418 'size' => CRM_Utils_Type
::HUGE
,
422 'pseudoconstant' => array(
423 'table' => 'civicrm_payment_processor',
425 'labelColumn' => 'name',
428 'is_credit_card_only' => array(
429 'name' => 'is_credit_card_only',
430 'type' => CRM_Utils_Type
::T_BOOLEAN
,
431 'title' => ts('Is Credit Card Only?') ,
432 'description' => 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
434 'is_monetary' => array(
435 'name' => 'is_monetary',
436 'type' => CRM_Utils_Type
::T_BOOLEAN
,
437 'title' => ts('Is Monetary') ,
438 'description' => 'if true - allows real-time monetary transactions otherwise non-monetary transactions',
442 'name' => 'is_recur',
443 'type' => CRM_Utils_Type
::T_BOOLEAN
,
444 'title' => ts('Is Recurring') ,
445 'description' => 'if true - allows recurring contributions, valid only for PayPal_Standard',
447 'is_confirm_enabled' => array(
448 'name' => 'is_confirm_enabled',
449 'type' => CRM_Utils_Type
::T_BOOLEAN
,
450 'title' => ts('Confirmation Page?') ,
451 'description' => 'if false, the confirm page in contribution pages gets skipped',
454 'recur_frequency_unit' => array(
455 'name' => 'recur_frequency_unit',
456 'type' => CRM_Utils_Type
::T_STRING
,
457 'title' => ts('Recurring Frequency') ,
458 'description' => 'Supported recurring frequency units.',
460 'size' => CRM_Utils_Type
::HUGE
,
462 'is_recur_interval' => array(
463 'name' => 'is_recur_interval',
464 'type' => CRM_Utils_Type
::T_BOOLEAN
,
465 'title' => ts('Support Recurring Intervals') ,
466 'description' => 'if true - supports recurring intervals',
468 'is_recur_installments' => array(
469 'name' => 'is_recur_installments',
470 'type' => CRM_Utils_Type
::T_BOOLEAN
,
471 'title' => ts('Recurring Installments?') ,
472 'description' => 'if true - asks user for recurring installments',
474 'adjust_recur_start_date' => array(
475 'name' => 'adjust_recur_start_date',
476 'type' => CRM_Utils_Type
::T_BOOLEAN
,
477 'title' => ts('Adjust Recurring Start Date') ,
478 'description' => 'if true - user is able to adjust payment start date',
480 'is_pay_later' => array(
481 'name' => 'is_pay_later',
482 'type' => CRM_Utils_Type
::T_BOOLEAN
,
483 'title' => ts('Pay Later') ,
484 'description' => 'if true - allows the user to send payment directly to the org later',
486 'pay_later_text' => array(
487 'name' => 'pay_later_text',
488 'type' => CRM_Utils_Type
::T_TEXT
,
489 'title' => ts('Pay Later Text') ,
490 'description' => 'The text displayed to the user in the main form',
492 'pay_later_receipt' => array(
493 'name' => 'pay_later_receipt',
494 'type' => CRM_Utils_Type
::T_TEXT
,
495 'title' => ts('Pay Later Receipt') ,
496 'description' => 'The receipt sent to the user instead of the normal receipt text',
498 'is_partial_payment' => array(
499 'name' => 'is_partial_payment',
500 'type' => CRM_Utils_Type
::T_BOOLEAN
,
501 'title' => ts('Allow Partial Payment') ,
502 'description' => 'is partial payment enabled for this online contribution page',
504 'initial_amount_label' => array(
505 'name' => 'initial_amount_label',
506 'type' => CRM_Utils_Type
::T_STRING
,
507 'title' => ts('Initial Amount Label') ,
508 'description' => 'Initial amount label for partial payment',
510 'size' => CRM_Utils_Type
::HUGE
,
512 'initial_amount_help_text' => array(
513 'name' => 'initial_amount_help_text',
514 'type' => CRM_Utils_Type
::T_TEXT
,
515 'title' => ts('Initial Amount Help Text') ,
516 'description' => 'Initial amount help text for partial payment',
518 'min_initial_amount' => array(
519 'name' => 'min_initial_amount',
520 'type' => CRM_Utils_Type
::T_MONEY
,
521 'title' => ts('Min Initial Amount') ,
522 'description' => 'Minimum initial amount for partial payment',
523 'precision' => array(
528 'is_allow_other_amount' => array(
529 'name' => 'is_allow_other_amount',
530 'type' => CRM_Utils_Type
::T_BOOLEAN
,
531 'title' => ts('Allow Other Amounts') ,
532 'description' => 'if true, page will include an input text field where user can enter their own amount',
534 'default_amount_id' => array(
535 'name' => 'default_amount_id',
536 'type' => CRM_Utils_Type
::T_INT
,
537 'title' => ts('Default Amount') ,
538 'description' => 'FK to civicrm_option_value.',
540 'min_amount' => array(
541 'name' => 'min_amount',
542 'type' => CRM_Utils_Type
::T_MONEY
,
543 'title' => ts('Minimum Amount') ,
544 'description' => 'if other amounts allowed, user can configure minimum allowed.',
545 'precision' => array(
550 'max_amount' => array(
551 'name' => 'max_amount',
552 'type' => CRM_Utils_Type
::T_MONEY
,
553 'title' => ts('Maximum Amount') ,
554 'description' => 'if other amounts allowed, user can configure maximum allowed.',
555 'precision' => array(
560 'goal_amount' => array(
561 'name' => 'goal_amount',
562 'type' => CRM_Utils_Type
::T_MONEY
,
563 'title' => ts('Goal Amount') ,
564 'description' => 'The target goal for this page, allows people to build a goal meter',
565 'precision' => array(
570 'thankyou_title' => array(
571 'name' => 'thankyou_title',
572 'type' => CRM_Utils_Type
::T_STRING
,
573 'title' => ts('Thank-you Title') ,
574 'description' => 'Title for Thank-you page (header title tag, and display at the top of the page).',
576 'size' => CRM_Utils_Type
::HUGE
,
578 'thankyou_text' => array(
579 'name' => 'thankyou_text',
580 'type' => CRM_Utils_Type
::T_TEXT
,
581 'title' => ts('Thank-you Text') ,
582 'description' => 'text and html allowed. displayed above result on success page',
586 'type' => 'RichTextEditor',
589 'thankyou_footer' => array(
590 'name' => 'thankyou_footer',
591 'type' => CRM_Utils_Type
::T_TEXT
,
592 'title' => ts('Thank-you Footer') ,
593 'description' => '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.',
597 'type' => 'RichTextEditor',
600 'is_email_receipt' => array(
601 'name' => 'is_email_receipt',
602 'type' => CRM_Utils_Type
::T_BOOLEAN
,
603 'title' => ts('Send email Receipt') ,
604 'description' => 'if true, receipt is automatically emailed to contact on success',
606 'receipt_from_name' => array(
607 'name' => 'receipt_from_name',
608 'type' => CRM_Utils_Type
::T_STRING
,
609 'title' => ts('Receipt From') ,
610 'description' => 'FROM email name used for receipts generated by contributions to this contribution page.',
612 'size' => CRM_Utils_Type
::HUGE
,
614 'receipt_from_email' => array(
615 'name' => 'receipt_from_email',
616 'type' => CRM_Utils_Type
::T_STRING
,
617 'title' => ts('Receipt From email') ,
618 'description' => 'FROM email address used for receipts generated by contributions to this contribution page.',
620 'size' => CRM_Utils_Type
::HUGE
,
622 'cc_receipt' => array(
623 'name' => 'cc_receipt',
624 'type' => CRM_Utils_Type
::T_STRING
,
625 'title' => ts('Receipt cc') ,
626 'description' => 'comma-separated list of email addresses to cc each time a receipt is sent',
628 'size' => CRM_Utils_Type
::HUGE
,
630 'bcc_receipt' => array(
631 'name' => 'bcc_receipt',
632 'type' => CRM_Utils_Type
::T_STRING
,
633 'title' => ts('Receipt bcc') ,
634 'description' => 'comma-separated list of email addresses to bcc each time a receipt is sent',
636 'size' => CRM_Utils_Type
::HUGE
,
638 'receipt_text' => array(
639 'name' => 'receipt_text',
640 'type' => CRM_Utils_Type
::T_TEXT
,
641 'title' => ts('Receipt Text') ,
642 'description' => 'text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now',
646 'type' => 'TextArea',
649 'is_active' => array(
650 'name' => 'is_active',
651 'type' => CRM_Utils_Type
::T_BOOLEAN
,
652 'title' => ts('Is Page Active?') ,
653 'description' => 'Is this property active?',
655 'footer_text' => array(
656 'name' => 'footer_text',
657 'type' => CRM_Utils_Type
::T_TEXT
,
658 'title' => ts('Footer Text') ,
659 'description' => 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.',
663 'type' => 'RichTextEditor',
666 'amount_block_is_active' => array(
667 'name' => 'amount_block_is_active',
668 'type' => CRM_Utils_Type
::T_BOOLEAN
,
669 'title' => ts('Is Amount Block Active?') ,
670 'description' => 'Is this property active?',
673 'start_date' => array(
674 'name' => 'start_date',
675 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
676 'title' => ts('Contribution Page Start Date') ,
677 'description' => 'Date and time that this page starts.',
680 'name' => 'end_date',
681 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
682 'title' => ts('Contribution Page End Date') ,
683 'description' => 'Date and time that this page ends. May be NULL if no defined end date/time',
685 'created_id' => array(
686 'name' => 'created_id',
687 'type' => CRM_Utils_Type
::T_INT
,
688 'title' => ts('Contribution Page Created By') ,
689 'description' => 'FK to civicrm_contact, who created this contribution page',
690 'FKClassName' => 'CRM_Contact_DAO_Contact',
692 'created_date' => array(
693 'name' => 'created_date',
694 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
695 'title' => ts('Contribution Page Created Date') ,
696 'description' => 'Date and time that contribution page was created.',
699 'name' => 'currency',
700 'type' => CRM_Utils_Type
::T_STRING
,
701 'title' => ts('Contribution Page Currency') ,
702 'description' => '3 character string, value from config setting or input via user.',
704 'size' => CRM_Utils_Type
::FOUR
,
709 'pseudoconstant' => array(
710 'table' => 'civicrm_currency',
711 'keyColumn' => 'name',
712 'labelColumn' => 'full_name',
713 'nameColumn' => 'name',
716 'campaign_id' => array(
717 'name' => 'campaign_id',
718 'type' => CRM_Utils_Type
::T_INT
,
719 'title' => ts('Contribution Page Campaign ID') ,
720 'description' => 'The campaign for which we are collecting contributions with this page.',
721 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
722 'pseudoconstant' => array(
723 'table' => 'civicrm_campaign',
725 'labelColumn' => 'title',
729 'name' => 'is_share',
730 'type' => CRM_Utils_Type
::T_BOOLEAN
,
731 'title' => ts('Is Contribution Page Shared?') ,
732 'description' => 'Can people share the contribution page through social media?',
735 'is_billing_required' => array(
736 'name' => 'is_billing_required',
737 'type' => CRM_Utils_Type
::T_BOOLEAN
,
738 'title' => ts('Is billing block required') ,
739 'description' => 'if true - billing block is required for online contribution page',
743 return self
::$_fields;
746 * Returns an array containing, for each field, the arary key used for that
747 * field in self::$_fields.
751 static function &fieldKeys() {
752 if (!(self
::$_fieldKeys)) {
753 self
::$_fieldKeys = array(
756 'intro_text' => 'intro_text',
757 'financial_type_id' => 'financial_type_id',
758 'payment_processor' => 'payment_processor',
759 'is_credit_card_only' => 'is_credit_card_only',
760 'is_monetary' => 'is_monetary',
761 'is_recur' => 'is_recur',
762 'is_confirm_enabled' => 'is_confirm_enabled',
763 'recur_frequency_unit' => 'recur_frequency_unit',
764 'is_recur_interval' => 'is_recur_interval',
765 'is_recur_installments' => 'is_recur_installments',
766 'adjust_recur_start_date' => 'adjust_recur_start_date',
767 'is_pay_later' => 'is_pay_later',
768 'pay_later_text' => 'pay_later_text',
769 'pay_later_receipt' => 'pay_later_receipt',
770 'is_partial_payment' => 'is_partial_payment',
771 'initial_amount_label' => 'initial_amount_label',
772 'initial_amount_help_text' => 'initial_amount_help_text',
773 'min_initial_amount' => 'min_initial_amount',
774 'is_allow_other_amount' => 'is_allow_other_amount',
775 'default_amount_id' => 'default_amount_id',
776 'min_amount' => 'min_amount',
777 'max_amount' => 'max_amount',
778 'goal_amount' => 'goal_amount',
779 'thankyou_title' => 'thankyou_title',
780 'thankyou_text' => 'thankyou_text',
781 'thankyou_footer' => 'thankyou_footer',
782 'is_email_receipt' => 'is_email_receipt',
783 'receipt_from_name' => 'receipt_from_name',
784 'receipt_from_email' => 'receipt_from_email',
785 'cc_receipt' => 'cc_receipt',
786 'bcc_receipt' => 'bcc_receipt',
787 'receipt_text' => 'receipt_text',
788 'is_active' => 'is_active',
789 'footer_text' => 'footer_text',
790 'amount_block_is_active' => 'amount_block_is_active',
791 'start_date' => 'start_date',
792 'end_date' => 'end_date',
793 'created_id' => 'created_id',
794 'created_date' => 'created_date',
795 'currency' => 'currency',
796 'campaign_id' => 'campaign_id',
797 'is_share' => 'is_share',
798 'is_billing_required' => 'is_billing_required',
801 return self
::$_fieldKeys;
804 * Returns the names of this table
808 static function getTableName() {
809 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
812 * Returns if this table needs to be logged
820 * Returns the list of fields that can be imported
822 * @param bool $prefix
826 static function &import($prefix = false) {
827 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, array());
831 * Returns the list of fields that can be exported
833 * @param bool $prefix
837 static function &export($prefix = false) {
838 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, array());