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 FK relationships
55 static $_links = null;
57 * static value to see if we should log any modifications to
58 * this table in the civicrm_log table
70 * Contribution Page title. For top of page display
76 * Text and html allowed. Displayed below title.
82 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
86 public $financial_type_id;
88 * Payment Processors configured for this contribution Page
92 public $payment_processor;
94 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
98 public $is_credit_card_only;
100 * if true - allows real-time monetary transactions otherwise non-monetary transactions
106 * if true - allows recurring contributions, valid only for PayPal_Standard
112 * if false, the confirm page in contribution pages gets skipped
116 public $is_confirm_enabled;
118 * Supported recurring frequency units.
122 public $recur_frequency_unit;
124 * if true - supports recurring intervals
128 public $is_recur_interval;
130 * if true - asks user for recurring installments
134 public $is_recur_installments;
136 * if true - user is able to adjust payment start date
140 public $adjust_recur_start_date;
142 * if true - allows the user to send payment directly to the org later
146 public $is_pay_later;
148 * The text displayed to the user in the main form
152 public $pay_later_text;
154 * The receipt sent to the user instead of the normal receipt text
158 public $pay_later_receipt;
160 * is partial payment enabled for this online contribution page
164 public $is_partial_payment;
166 * Initial amount label for partial payment
170 public $initial_amount_label;
172 * Initial amount help text for partial payment
176 public $initial_amount_help_text;
178 * Minimum initial amount for partial payment
182 public $min_initial_amount;
184 * if true, page will include an input text field where user can enter their own amount
188 public $is_allow_other_amount;
190 * FK to civicrm_option_value.
194 public $default_amount_id;
196 * if other amounts allowed, user can configure minimum allowed.
202 * if other amounts allowed, user can configure maximum allowed.
208 * The target goal for this page, allows people to build a goal meter
214 * Title for Thank-you page (header title tag, and display at the top of the page).
218 public $thankyou_title;
220 * text and html allowed. displayed above result on success page
224 public $thankyou_text;
226 * 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.
230 public $thankyou_footer;
232 * if true, receipt is automatically emailed to contact on success
236 public $is_email_receipt;
238 * FROM email name used for receipts generated by contributions to this contribution page.
242 public $receipt_from_name;
244 * FROM email address used for receipts generated by contributions to this contribution page.
248 public $receipt_from_email;
250 * comma-separated list of email addresses to cc each time a receipt is sent
256 * comma-separated list of email addresses to bcc each time a receipt is sent
262 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
266 public $receipt_text;
268 * Is this property active?
274 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
280 * Is this property active?
284 public $amount_block_is_active;
286 * Date and time that this page starts.
292 * Date and time that this page ends. May be NULL if no defined end date/time
298 * FK to civicrm_contact, who created this contribution page
304 * Date and time that contribution page was created.
308 public $created_date;
310 * 3 character string, value from config setting or input via user.
316 * The campaign for which we are collecting contributions with this page.
322 * Can people share the contribution page through social media?
328 * if true - billing block is required for online contribution page
332 public $is_billing_required;
336 * @return civicrm_contribution_page
338 function __construct() {
339 $this->__table
= 'civicrm_contribution_page';
340 parent
::__construct();
343 * Returns foreign keys and entity references
346 * [CRM_Core_Reference_Interface]
348 static function getReferenceColumns() {
349 if (!self
::$_links) {
350 self
::$_links = static ::createReferenceColumns(__CLASS__
);
351 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
352 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
353 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
355 return self
::$_links;
358 * Returns all the column names of this table
362 static function &fields() {
363 if (!(self
::$_fields)) {
364 self
::$_fields = array(
367 'type' => CRM_Utils_Type
::T_INT
,
368 'title' => ts('Contribution Page ID') ,
369 'description' => 'Contribution Id',
374 'type' => CRM_Utils_Type
::T_STRING
,
375 'title' => ts('Contribution Page Title') ,
376 'description' => 'Contribution Page title. For top of page display',
378 'size' => CRM_Utils_Type
::HUGE
,
380 'intro_text' => array(
381 'name' => 'intro_text',
382 'type' => CRM_Utils_Type
::T_TEXT
,
383 'title' => ts('Contribution Page Introduction Text') ,
384 'description' => 'Text and html allowed. Displayed below title.',
388 'type' => 'RichTextEditor',
391 'financial_type_id' => array(
392 'name' => 'financial_type_id',
393 'type' => CRM_Utils_Type
::T_INT
,
394 'title' => ts('Financial Type') ,
395 'description' => 'default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
396 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
400 'pseudoconstant' => array(
401 'table' => 'civicrm_financial_type',
403 'labelColumn' => 'name',
406 'payment_processor' => array(
407 'name' => 'payment_processor',
408 'type' => CRM_Utils_Type
::T_STRING
,
409 'title' => ts('Payment Processor') ,
410 'description' => 'Payment Processors configured for this contribution Page',
412 'size' => CRM_Utils_Type
::HUGE
,
416 'pseudoconstant' => array(
417 'table' => 'civicrm_payment_processor',
419 'labelColumn' => 'name',
422 'is_credit_card_only' => array(
423 'name' => 'is_credit_card_only',
424 'type' => CRM_Utils_Type
::T_BOOLEAN
,
425 'title' => ts('Is Credit Card Only?') ,
426 'description' => 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
428 'is_monetary' => array(
429 'name' => 'is_monetary',
430 'type' => CRM_Utils_Type
::T_BOOLEAN
,
431 'title' => ts('Is Monetary') ,
432 'description' => 'if true - allows real-time monetary transactions otherwise non-monetary transactions',
436 'name' => 'is_recur',
437 'type' => CRM_Utils_Type
::T_BOOLEAN
,
438 'title' => ts('Is Recurring') ,
439 'description' => 'if true - allows recurring contributions, valid only for PayPal_Standard',
441 'is_confirm_enabled' => array(
442 'name' => 'is_confirm_enabled',
443 'type' => CRM_Utils_Type
::T_BOOLEAN
,
444 'title' => ts('Confirmation Page?') ,
445 'description' => 'if false, the confirm page in contribution pages gets skipped',
448 'recur_frequency_unit' => array(
449 'name' => 'recur_frequency_unit',
450 'type' => CRM_Utils_Type
::T_STRING
,
451 'title' => ts('Recurring Frequency') ,
452 'description' => 'Supported recurring frequency units.',
454 'size' => CRM_Utils_Type
::HUGE
,
456 'is_recur_interval' => array(
457 'name' => 'is_recur_interval',
458 'type' => CRM_Utils_Type
::T_BOOLEAN
,
459 'title' => ts('Support Recurring Intervals') ,
460 'description' => 'if true - supports recurring intervals',
462 'is_recur_installments' => array(
463 'name' => 'is_recur_installments',
464 'type' => CRM_Utils_Type
::T_BOOLEAN
,
465 'title' => ts('Recurring Installments?') ,
466 'description' => 'if true - asks user for recurring installments',
468 'adjust_recur_start_date' => array(
469 'name' => 'adjust_recur_start_date',
470 'type' => CRM_Utils_Type
::T_BOOLEAN
,
471 'title' => ts('Adjust Recurring Start Date') ,
472 'description' => 'if true - user is able to adjust payment start date',
474 'is_pay_later' => array(
475 'name' => 'is_pay_later',
476 'type' => CRM_Utils_Type
::T_BOOLEAN
,
477 'title' => ts('Pay Later') ,
478 'description' => 'if true - allows the user to send payment directly to the org later',
480 'pay_later_text' => array(
481 'name' => 'pay_later_text',
482 'type' => CRM_Utils_Type
::T_TEXT
,
483 'title' => ts('Pay Later Text') ,
484 'description' => 'The text displayed to the user in the main form',
486 'pay_later_receipt' => array(
487 'name' => 'pay_later_receipt',
488 'type' => CRM_Utils_Type
::T_TEXT
,
489 'title' => ts('Pay Later Receipt') ,
490 'description' => 'The receipt sent to the user instead of the normal receipt text',
492 'is_partial_payment' => array(
493 'name' => 'is_partial_payment',
494 'type' => CRM_Utils_Type
::T_BOOLEAN
,
495 'title' => ts('Allow Partial Payment') ,
496 'description' => 'is partial payment enabled for this online contribution page',
498 'initial_amount_label' => array(
499 'name' => 'initial_amount_label',
500 'type' => CRM_Utils_Type
::T_STRING
,
501 'title' => ts('Initial Amount Label') ,
502 'description' => 'Initial amount label for partial payment',
504 'size' => CRM_Utils_Type
::HUGE
,
506 'initial_amount_help_text' => array(
507 'name' => 'initial_amount_help_text',
508 'type' => CRM_Utils_Type
::T_TEXT
,
509 'title' => ts('Initial Amount Help Text') ,
510 'description' => 'Initial amount help text for partial payment',
512 'min_initial_amount' => array(
513 'name' => 'min_initial_amount',
514 'type' => CRM_Utils_Type
::T_MONEY
,
515 'title' => ts('Min Initial Amount') ,
516 'description' => 'Minimum initial amount for partial payment',
517 'precision' => array(
522 'is_allow_other_amount' => array(
523 'name' => 'is_allow_other_amount',
524 'type' => CRM_Utils_Type
::T_BOOLEAN
,
525 'title' => ts('Allow Other Amounts') ,
526 'description' => 'if true, page will include an input text field where user can enter their own amount',
528 'default_amount_id' => array(
529 'name' => 'default_amount_id',
530 'type' => CRM_Utils_Type
::T_INT
,
531 'title' => ts('Default Amount') ,
532 'description' => 'FK to civicrm_option_value.',
534 'min_amount' => array(
535 'name' => 'min_amount',
536 'type' => CRM_Utils_Type
::T_MONEY
,
537 'title' => ts('Minimum Amount') ,
538 'description' => 'if other amounts allowed, user can configure minimum allowed.',
539 'precision' => array(
544 'max_amount' => array(
545 'name' => 'max_amount',
546 'type' => CRM_Utils_Type
::T_MONEY
,
547 'title' => ts('Maximum Amount') ,
548 'description' => 'if other amounts allowed, user can configure maximum allowed.',
549 'precision' => array(
554 'goal_amount' => array(
555 'name' => 'goal_amount',
556 'type' => CRM_Utils_Type
::T_MONEY
,
557 'title' => ts('Goal Amount') ,
558 'description' => 'The target goal for this page, allows people to build a goal meter',
559 'precision' => array(
564 'thankyou_title' => array(
565 'name' => 'thankyou_title',
566 'type' => CRM_Utils_Type
::T_STRING
,
567 'title' => ts('Thank-you Title') ,
568 'description' => 'Title for Thank-you page (header title tag, and display at the top of the page).',
570 'size' => CRM_Utils_Type
::HUGE
,
572 'thankyou_text' => array(
573 'name' => 'thankyou_text',
574 'type' => CRM_Utils_Type
::T_TEXT
,
575 'title' => ts('Thank-you Text') ,
576 'description' => 'text and html allowed. displayed above result on success page',
580 'type' => 'RichTextEditor',
583 'thankyou_footer' => array(
584 'name' => 'thankyou_footer',
585 'type' => CRM_Utils_Type
::T_TEXT
,
586 'title' => ts('Thank-you Footer') ,
587 '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.',
591 'type' => 'RichTextEditor',
594 'is_email_receipt' => array(
595 'name' => 'is_email_receipt',
596 'type' => CRM_Utils_Type
::T_BOOLEAN
,
597 'title' => ts('Send email Receipt') ,
598 'description' => 'if true, receipt is automatically emailed to contact on success',
600 'receipt_from_name' => array(
601 'name' => 'receipt_from_name',
602 'type' => CRM_Utils_Type
::T_STRING
,
603 'title' => ts('Receipt From') ,
604 'description' => 'FROM email name used for receipts generated by contributions to this contribution page.',
606 'size' => CRM_Utils_Type
::HUGE
,
608 'receipt_from_email' => array(
609 'name' => 'receipt_from_email',
610 'type' => CRM_Utils_Type
::T_STRING
,
611 'title' => ts('Receipt From email') ,
612 'description' => 'FROM email address used for receipts generated by contributions to this contribution page.',
614 'size' => CRM_Utils_Type
::HUGE
,
616 'cc_receipt' => array(
617 'name' => 'cc_receipt',
618 'type' => CRM_Utils_Type
::T_STRING
,
619 'title' => ts('Receipt cc') ,
620 'description' => 'comma-separated list of email addresses to cc each time a receipt is sent',
622 'size' => CRM_Utils_Type
::HUGE
,
624 'bcc_receipt' => array(
625 'name' => 'bcc_receipt',
626 'type' => CRM_Utils_Type
::T_STRING
,
627 'title' => ts('Receipt bcc') ,
628 'description' => 'comma-separated list of email addresses to bcc each time a receipt is sent',
630 'size' => CRM_Utils_Type
::HUGE
,
632 'receipt_text' => array(
633 'name' => 'receipt_text',
634 'type' => CRM_Utils_Type
::T_TEXT
,
635 'title' => ts('Receipt Text') ,
636 'description' => 'text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now',
640 'type' => 'TextArea',
643 'is_active' => array(
644 'name' => 'is_active',
645 'type' => CRM_Utils_Type
::T_BOOLEAN
,
646 'title' => ts('Is Page Active?') ,
647 'description' => 'Is this property active?',
649 'footer_text' => array(
650 'name' => 'footer_text',
651 'type' => CRM_Utils_Type
::T_TEXT
,
652 'title' => ts('Footer Text') ,
653 'description' => 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.',
657 'type' => 'RichTextEditor',
660 'amount_block_is_active' => array(
661 'name' => 'amount_block_is_active',
662 'type' => CRM_Utils_Type
::T_BOOLEAN
,
663 'title' => ts('Is Amount Block Active?') ,
664 'description' => 'Is this property active?',
667 'start_date' => array(
668 'name' => 'start_date',
669 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
670 'title' => ts('Contribution Page Start Date') ,
671 'description' => 'Date and time that this page starts.',
674 'name' => 'end_date',
675 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
676 'title' => ts('Contribution Page End Date') ,
677 'description' => 'Date and time that this page ends. May be NULL if no defined end date/time',
679 'created_id' => array(
680 'name' => 'created_id',
681 'type' => CRM_Utils_Type
::T_INT
,
682 'title' => ts('Contribution Page Created By') ,
683 'description' => 'FK to civicrm_contact, who created this contribution page',
684 'FKClassName' => 'CRM_Contact_DAO_Contact',
686 'created_date' => array(
687 'name' => 'created_date',
688 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
689 'title' => ts('Contribution Page Created Date') ,
690 'description' => 'Date and time that contribution page was created.',
693 'name' => 'currency',
694 'type' => CRM_Utils_Type
::T_STRING
,
695 'title' => ts('Contribution Page Currency') ,
696 'description' => '3 character string, value from config setting or input via user.',
698 'size' => CRM_Utils_Type
::FOUR
,
703 'pseudoconstant' => array(
704 'table' => 'civicrm_currency',
705 'keyColumn' => 'name',
706 'labelColumn' => 'full_name',
707 'nameColumn' => 'name',
710 'campaign_id' => array(
711 'name' => 'campaign_id',
712 'type' => CRM_Utils_Type
::T_INT
,
713 'title' => ts('Contribution Page Campaign ID') ,
714 'description' => 'The campaign for which we are collecting contributions with this page.',
715 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
716 'pseudoconstant' => array(
717 'table' => 'civicrm_campaign',
719 'labelColumn' => 'title',
723 'name' => 'is_share',
724 'type' => CRM_Utils_Type
::T_BOOLEAN
,
725 'title' => ts('Is Contribution Page Shared?') ,
726 'description' => 'Can people share the contribution page through social media?',
729 'is_billing_required' => array(
730 'name' => 'is_billing_required',
731 'type' => CRM_Utils_Type
::T_BOOLEAN
,
732 'title' => ts('Is billing block required') ,
733 'description' => 'if true - billing block is required for online contribution page',
737 return self
::$_fields;
740 * Return a mapping from field-name to the corresponding key (as used in fields()).
743 * Array(string $name => string $uniqueName).
745 static function &fieldKeys() {
746 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
747 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
749 return Civi
::$statics[__CLASS__
]['fieldKeys'];
752 * Returns the names of this table
756 static function getTableName() {
757 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
760 * Returns if this table needs to be logged
768 * Returns the list of fields that can be imported
770 * @param bool $prefix
774 static function &import($prefix = false) {
775 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, array());
779 * Returns the list of fields that can be exported
781 * @param bool $prefix
785 static function &export($prefix = false) {
786 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, array());