3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
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-2017
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 value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * Contribution Page title. For top of page display
64 * Text and html allowed. Displayed below title.
70 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
74 public $financial_type_id;
76 * Payment Processors configured for this contribution Page
80 public $payment_processor;
82 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
86 public $is_credit_card_only;
88 * if true - allows real-time monetary transactions otherwise non-monetary transactions
94 * if true - allows recurring contributions, valid only for PayPal_Standard
100 * if false, the confirm page in contribution pages gets skipped
104 public $is_confirm_enabled;
106 * Supported recurring frequency units.
110 public $recur_frequency_unit;
112 * if true - supports recurring intervals
116 public $is_recur_interval;
118 * if true - asks user for recurring installments
122 public $is_recur_installments;
124 * if true - user is able to adjust payment start date
128 public $adjust_recur_start_date;
130 * if true - allows the user to send payment directly to the org later
134 public $is_pay_later;
136 * The text displayed to the user in the main form
140 public $pay_later_text;
142 * The receipt sent to the user instead of the normal receipt text
146 public $pay_later_receipt;
148 * is partial payment enabled for this online contribution page
152 public $is_partial_payment;
154 * Initial amount label for partial payment
158 public $initial_amount_label;
160 * Initial amount help text for partial payment
164 public $initial_amount_help_text;
166 * Minimum initial amount for partial payment
170 public $min_initial_amount;
172 * if true, page will include an input text field where user can enter their own amount
176 public $is_allow_other_amount;
178 * FK to civicrm_option_value.
182 public $default_amount_id;
184 * if other amounts allowed, user can configure minimum allowed.
190 * if other amounts allowed, user can configure maximum allowed.
196 * The target goal for this page, allows people to build a goal meter
202 * Title for Thank-you page (header title tag, and display at the top of the page).
206 public $thankyou_title;
208 * text and html allowed. displayed above result on success page
212 public $thankyou_text;
214 * 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.
218 public $thankyou_footer;
220 * if true, receipt is automatically emailed to contact on success
224 public $is_email_receipt;
226 * FROM email name used for receipts generated by contributions to this contribution page.
230 public $receipt_from_name;
232 * FROM email address used for receipts generated by contributions to this contribution page.
236 public $receipt_from_email;
238 * comma-separated list of email addresses to cc each time a receipt is sent
244 * comma-separated list of email addresses to bcc each time a receipt is sent
250 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
254 public $receipt_text;
256 * Is this property active?
262 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
268 * Is this property active?
272 public $amount_block_is_active;
274 * Date and time that this page starts.
280 * Date and time that this page ends. May be NULL if no defined end date/time
286 * FK to civicrm_contact, who created this contribution page
292 * Date and time that contribution page was created.
296 public $created_date;
298 * 3 character string, value from config setting or input via user.
304 * The campaign for which we are collecting contributions with this page.
310 * Can people share the contribution page through social media?
316 * if true - billing block is required for online contribution page
320 public $is_billing_required;
324 * @return civicrm_contribution_page
326 function __construct() {
327 $this->__table
= 'civicrm_contribution_page';
328 parent
::__construct();
331 * Returns foreign keys and entity references
334 * [CRM_Core_Reference_Interface]
336 static function getReferenceColumns() {
337 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
338 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
339 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
340 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
341 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
342 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
344 return Civi
::$statics[__CLASS__
]['links'];
347 * Returns all the column names of this table
351 static function &fields() {
352 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
353 Civi
::$statics[__CLASS__
]['fields'] = array(
356 'type' => CRM_Utils_Type
::T_INT
,
357 'title' => ts('Contribution Page ID') ,
358 'description' => 'Contribution Id',
363 'type' => CRM_Utils_Type
::T_STRING
,
364 'title' => ts('Contribution Page Title') ,
365 'description' => 'Contribution Page title. For top of page display',
367 'size' => CRM_Utils_Type
::HUGE
,
369 'intro_text' => array(
370 'name' => 'intro_text',
371 'type' => CRM_Utils_Type
::T_TEXT
,
372 'title' => ts('Contribution Page Introduction Text') ,
373 'description' => 'Text and html allowed. Displayed below title.',
377 'type' => 'RichTextEditor',
380 'financial_type_id' => array(
381 'name' => 'financial_type_id',
382 'type' => CRM_Utils_Type
::T_INT
,
383 'title' => ts('Financial Type') ,
384 'description' => 'default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
385 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
389 'pseudoconstant' => array(
390 'table' => 'civicrm_financial_type',
392 'labelColumn' => 'name',
395 'payment_processor' => array(
396 'name' => 'payment_processor',
397 'type' => CRM_Utils_Type
::T_STRING
,
398 'title' => ts('Payment Processor') ,
399 'description' => 'Payment Processors configured for this contribution Page',
401 'size' => CRM_Utils_Type
::HUGE
,
405 'pseudoconstant' => array(
406 'table' => 'civicrm_payment_processor',
408 'labelColumn' => 'name',
411 'is_credit_card_only' => array(
412 'name' => 'is_credit_card_only',
413 'type' => CRM_Utils_Type
::T_BOOLEAN
,
414 'title' => ts('Is Credit Card Only?') ,
415 'description' => 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
417 'is_monetary' => array(
418 'name' => 'is_monetary',
419 'type' => CRM_Utils_Type
::T_BOOLEAN
,
420 'title' => ts('Is Monetary') ,
421 'description' => 'if true - allows real-time monetary transactions otherwise non-monetary transactions',
425 'name' => 'is_recur',
426 'type' => CRM_Utils_Type
::T_BOOLEAN
,
427 'title' => ts('Is Recurring') ,
428 'description' => 'if true - allows recurring contributions, valid only for PayPal_Standard',
430 'is_confirm_enabled' => array(
431 'name' => 'is_confirm_enabled',
432 'type' => CRM_Utils_Type
::T_BOOLEAN
,
433 'title' => ts('Confirmation Page?') ,
434 'description' => 'if false, the confirm page in contribution pages gets skipped',
437 'recur_frequency_unit' => array(
438 'name' => 'recur_frequency_unit',
439 'type' => CRM_Utils_Type
::T_STRING
,
440 'title' => ts('Recurring Frequency') ,
441 'description' => 'Supported recurring frequency units.',
443 'size' => CRM_Utils_Type
::HUGE
,
445 'is_recur_interval' => array(
446 'name' => 'is_recur_interval',
447 'type' => CRM_Utils_Type
::T_BOOLEAN
,
448 'title' => ts('Support Recurring Intervals') ,
449 'description' => 'if true - supports recurring intervals',
451 'is_recur_installments' => array(
452 'name' => 'is_recur_installments',
453 'type' => CRM_Utils_Type
::T_BOOLEAN
,
454 'title' => ts('Recurring Installments?') ,
455 'description' => 'if true - asks user for recurring installments',
457 'adjust_recur_start_date' => array(
458 'name' => 'adjust_recur_start_date',
459 'type' => CRM_Utils_Type
::T_BOOLEAN
,
460 'title' => ts('Adjust Recurring Start Date') ,
461 'description' => 'if true - user is able to adjust payment start date',
463 'is_pay_later' => array(
464 'name' => 'is_pay_later',
465 'type' => CRM_Utils_Type
::T_BOOLEAN
,
466 'title' => ts('Pay Later') ,
467 'description' => 'if true - allows the user to send payment directly to the org later',
469 'pay_later_text' => array(
470 'name' => 'pay_later_text',
471 'type' => CRM_Utils_Type
::T_TEXT
,
472 'title' => ts('Pay Later Text') ,
473 'description' => 'The text displayed to the user in the main form',
475 'pay_later_receipt' => array(
476 'name' => 'pay_later_receipt',
477 'type' => CRM_Utils_Type
::T_TEXT
,
478 'title' => ts('Pay Later Receipt') ,
479 'description' => 'The receipt sent to the user instead of the normal receipt text',
481 'is_partial_payment' => array(
482 'name' => 'is_partial_payment',
483 'type' => CRM_Utils_Type
::T_BOOLEAN
,
484 'title' => ts('Allow Partial Payment') ,
485 'description' => 'is partial payment enabled for this online contribution page',
487 'initial_amount_label' => array(
488 'name' => 'initial_amount_label',
489 'type' => CRM_Utils_Type
::T_STRING
,
490 'title' => ts('Initial Amount Label') ,
491 'description' => 'Initial amount label for partial payment',
493 'size' => CRM_Utils_Type
::HUGE
,
495 'initial_amount_help_text' => array(
496 'name' => 'initial_amount_help_text',
497 'type' => CRM_Utils_Type
::T_TEXT
,
498 'title' => ts('Initial Amount Help Text') ,
499 'description' => 'Initial amount help text for partial payment',
501 'min_initial_amount' => array(
502 'name' => 'min_initial_amount',
503 'type' => CRM_Utils_Type
::T_MONEY
,
504 'title' => ts('Min Initial Amount') ,
505 'description' => 'Minimum initial amount for partial payment',
506 'precision' => array(
511 'is_allow_other_amount' => array(
512 'name' => 'is_allow_other_amount',
513 'type' => CRM_Utils_Type
::T_BOOLEAN
,
514 'title' => ts('Allow Other Amounts') ,
515 'description' => 'if true, page will include an input text field where user can enter their own amount',
517 'default_amount_id' => array(
518 'name' => 'default_amount_id',
519 'type' => CRM_Utils_Type
::T_INT
,
520 'title' => ts('Default Amount') ,
521 'description' => 'FK to civicrm_option_value.',
523 'min_amount' => array(
524 'name' => 'min_amount',
525 'type' => CRM_Utils_Type
::T_MONEY
,
526 'title' => ts('Minimum Amount') ,
527 'description' => 'if other amounts allowed, user can configure minimum allowed.',
528 'precision' => array(
533 'max_amount' => array(
534 'name' => 'max_amount',
535 'type' => CRM_Utils_Type
::T_MONEY
,
536 'title' => ts('Maximum Amount') ,
537 'description' => 'if other amounts allowed, user can configure maximum allowed.',
538 'precision' => array(
543 'goal_amount' => array(
544 'name' => 'goal_amount',
545 'type' => CRM_Utils_Type
::T_MONEY
,
546 'title' => ts('Goal Amount') ,
547 'description' => 'The target goal for this page, allows people to build a goal meter',
548 'precision' => array(
553 'thankyou_title' => array(
554 'name' => 'thankyou_title',
555 'type' => CRM_Utils_Type
::T_STRING
,
556 'title' => ts('Thank-you Title') ,
557 'description' => 'Title for Thank-you page (header title tag, and display at the top of the page).',
559 'size' => CRM_Utils_Type
::HUGE
,
561 'thankyou_text' => array(
562 'name' => 'thankyou_text',
563 'type' => CRM_Utils_Type
::T_TEXT
,
564 'title' => ts('Thank-you Text') ,
565 'description' => 'text and html allowed. displayed above result on success page',
569 'type' => 'RichTextEditor',
572 'thankyou_footer' => array(
573 'name' => 'thankyou_footer',
574 'type' => CRM_Utils_Type
::T_TEXT
,
575 'title' => ts('Thank-you Footer') ,
576 '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.',
580 'type' => 'RichTextEditor',
583 'is_email_receipt' => array(
584 'name' => 'is_email_receipt',
585 'type' => CRM_Utils_Type
::T_BOOLEAN
,
586 'title' => ts('Send email Receipt') ,
587 'description' => 'if true, receipt is automatically emailed to contact on success',
589 'receipt_from_name' => array(
590 'name' => 'receipt_from_name',
591 'type' => CRM_Utils_Type
::T_STRING
,
592 'title' => ts('Receipt From') ,
593 'description' => 'FROM email name used for receipts generated by contributions to this contribution page.',
595 'size' => CRM_Utils_Type
::HUGE
,
597 'receipt_from_email' => array(
598 'name' => 'receipt_from_email',
599 'type' => CRM_Utils_Type
::T_STRING
,
600 'title' => ts('Receipt From email') ,
601 'description' => 'FROM email address used for receipts generated by contributions to this contribution page.',
603 'size' => CRM_Utils_Type
::HUGE
,
605 'cc_receipt' => array(
606 'name' => 'cc_receipt',
607 'type' => CRM_Utils_Type
::T_STRING
,
608 'title' => ts('Receipt cc') ,
609 'description' => 'comma-separated list of email addresses to cc each time a receipt is sent',
611 'size' => CRM_Utils_Type
::HUGE
,
613 'bcc_receipt' => array(
614 'name' => 'bcc_receipt',
615 'type' => CRM_Utils_Type
::T_STRING
,
616 'title' => ts('Receipt bcc') ,
617 'description' => 'comma-separated list of email addresses to bcc each time a receipt is sent',
619 'size' => CRM_Utils_Type
::HUGE
,
621 'receipt_text' => array(
622 'name' => 'receipt_text',
623 'type' => CRM_Utils_Type
::T_TEXT
,
624 'title' => ts('Receipt Text') ,
625 'description' => 'text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now',
629 'type' => 'TextArea',
632 'is_active' => array(
633 'name' => 'is_active',
634 'type' => CRM_Utils_Type
::T_BOOLEAN
,
635 'title' => ts('Is Page Active?') ,
636 'description' => 'Is this property active?',
638 'footer_text' => array(
639 'name' => 'footer_text',
640 'type' => CRM_Utils_Type
::T_TEXT
,
641 'title' => ts('Footer Text') ,
642 'description' => 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.',
646 'type' => 'RichTextEditor',
649 'amount_block_is_active' => array(
650 'name' => 'amount_block_is_active',
651 'type' => CRM_Utils_Type
::T_BOOLEAN
,
652 'title' => ts('Is Amount Block Active?') ,
653 'description' => 'Is this property active?',
656 'start_date' => array(
657 'name' => 'start_date',
658 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
659 'title' => ts('Contribution Page Start Date') ,
660 'description' => 'Date and time that this page starts.',
663 'name' => 'end_date',
664 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
665 'title' => ts('Contribution Page End Date') ,
666 'description' => 'Date and time that this page ends. May be NULL if no defined end date/time',
668 'created_id' => array(
669 'name' => 'created_id',
670 'type' => CRM_Utils_Type
::T_INT
,
671 'title' => ts('Contribution Page Created By') ,
672 'description' => 'FK to civicrm_contact, who created this contribution page',
673 'FKClassName' => 'CRM_Contact_DAO_Contact',
675 'created_date' => array(
676 'name' => 'created_date',
677 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
678 'title' => ts('Contribution Page Created Date') ,
679 'description' => 'Date and time that contribution page was created.',
682 'name' => 'currency',
683 'type' => CRM_Utils_Type
::T_STRING
,
684 'title' => ts('Contribution Page Currency') ,
685 'description' => '3 character string, value from config setting or input via user.',
687 'size' => CRM_Utils_Type
::FOUR
,
692 'pseudoconstant' => array(
693 'table' => 'civicrm_currency',
694 'keyColumn' => 'name',
695 'labelColumn' => 'full_name',
696 'nameColumn' => 'name',
699 'campaign_id' => array(
700 'name' => 'campaign_id',
701 'type' => CRM_Utils_Type
::T_INT
,
702 'title' => ts('Contribution Page Campaign ID') ,
703 'description' => 'The campaign for which we are collecting contributions with this page.',
704 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
705 'pseudoconstant' => array(
706 'table' => 'civicrm_campaign',
708 'labelColumn' => 'title',
712 'name' => 'is_share',
713 'type' => CRM_Utils_Type
::T_BOOLEAN
,
714 'title' => ts('Is Contribution Page Shared?') ,
715 'description' => 'Can people share the contribution page through social media?',
718 'is_billing_required' => array(
719 'name' => 'is_billing_required',
720 'type' => CRM_Utils_Type
::T_BOOLEAN
,
721 'title' => ts('Is billing block required') ,
722 'description' => 'if true - billing block is required for online contribution page',
725 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
727 return Civi
::$statics[__CLASS__
]['fields'];
730 * Return a mapping from field-name to the corresponding key (as used in fields()).
733 * Array(string $name => string $uniqueName).
735 static function &fieldKeys() {
736 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
737 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
739 return Civi
::$statics[__CLASS__
]['fieldKeys'];
742 * Returns the names of this table
746 static function getTableName() {
747 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
750 * Returns if this table needs to be logged
758 * Returns the list of fields that can be imported
760 * @param bool $prefix
764 static function &import($prefix = false) {
765 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_page', $prefix, array());
769 * Returns the list of fields that can be exported
771 * @param bool $prefix
775 static function &export($prefix = false) {
776 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_page', $prefix, array());