commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / CRM / Contribute / DAO / ContributionPage.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
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. |
13 | |
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. |
18 | |
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 +--------------------------------------------------------------------+
26 */
27 /**
28 * @package CRM
29 * @copyright CiviCRM LLC (c) 2004-2015
30 *
31 * Generated from xml/schema/CRM/Contribute/ContributionPage.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 */
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO {
37 /**
38 * static instance to hold the table name
39 *
40 * @var string
41 */
42 static $_tableName = 'civicrm_contribution_page';
43 /**
44 * static instance to hold the field values
45 *
46 * @var array
47 */
48 static $_fields = null;
49 /**
50 * static instance to hold the keys used in $_fields for each field.
51 *
52 * @var array
53 */
54 static $_fieldKeys = null;
55 /**
56 * static instance to hold the FK relationships
57 *
58 * @var string
59 */
60 static $_links = null;
61 /**
62 * static instance to hold the values that can
63 * be imported
64 *
65 * @var array
66 */
67 static $_import = null;
68 /**
69 * static instance to hold the values that can
70 * be exported
71 *
72 * @var array
73 */
74 static $_export = null;
75 /**
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
78 *
79 * @var boolean
80 */
81 static $_log = true;
82 /**
83 * Contribution Id
84 *
85 * @var int unsigned
86 */
87 public $id;
88 /**
89 * Contribution Page title. For top of page display
90 *
91 * @var string
92 */
93 public $title;
94 /**
95 * Text and html allowed. Displayed below title.
96 *
97 * @var text
98 */
99 public $intro_text;
100 /**
101 * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
102 *
103 * @var int unsigned
104 */
105 public $financial_type_id;
106 /**
107 * Payment Processors configured for this contribution Page
108 *
109 * @var string
110 */
111 public $payment_processor;
112 /**
113 * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
114 *
115 * @var boolean
116 */
117 public $is_credit_card_only;
118 /**
119 * if true - allows real-time monetary transactions otherwise non-monetary transactions
120 *
121 * @var boolean
122 */
123 public $is_monetary;
124 /**
125 * if true - allows recurring contributions, valid only for PayPal_Standard
126 *
127 * @var boolean
128 */
129 public $is_recur;
130 /**
131 * if false, the confirm page in contribution pages gets skipped
132 *
133 * @var boolean
134 */
135 public $is_confirm_enabled;
136 /**
137 * Supported recurring frequency units.
138 *
139 * @var string
140 */
141 public $recur_frequency_unit;
142 /**
143 * if true - supports recurring intervals
144 *
145 * @var boolean
146 */
147 public $is_recur_interval;
148 /**
149 * if true - asks user for recurring installments
150 *
151 * @var boolean
152 */
153 public $is_recur_installments;
154 /**
155 * if true - allows the user to send payment directly to the org later
156 *
157 * @var boolean
158 */
159 public $is_pay_later;
160 /**
161 * The text displayed to the user in the main form
162 *
163 * @var text
164 */
165 public $pay_later_text;
166 /**
167 * The receipt sent to the user instead of the normal receipt text
168 *
169 * @var text
170 */
171 public $pay_later_receipt;
172 /**
173 * is partial payment enabled for this online contribution page
174 *
175 * @var boolean
176 */
177 public $is_partial_payment;
178 /**
179 * Initial amount label for partial payment
180 *
181 * @var string
182 */
183 public $initial_amount_label;
184 /**
185 * Initial amount help text for partial payment
186 *
187 * @var text
188 */
189 public $initial_amount_help_text;
190 /**
191 * Minimum initial amount for partial payment
192 *
193 * @var float
194 */
195 public $min_initial_amount;
196 /**
197 * if true, page will include an input text field where user can enter their own amount
198 *
199 * @var boolean
200 */
201 public $is_allow_other_amount;
202 /**
203 * FK to civicrm_option_value.
204 *
205 * @var int unsigned
206 */
207 public $default_amount_id;
208 /**
209 * if other amounts allowed, user can configure minimum allowed.
210 *
211 * @var float
212 */
213 public $min_amount;
214 /**
215 * if other amounts allowed, user can configure maximum allowed.
216 *
217 * @var float
218 */
219 public $max_amount;
220 /**
221 * The target goal for this page, allows people to build a goal meter
222 *
223 * @var float
224 */
225 public $goal_amount;
226 /**
227 * Title for Thank-you page (header title tag, and display at the top of the page).
228 *
229 * @var string
230 */
231 public $thankyou_title;
232 /**
233 * text and html allowed. displayed above result on success page
234 *
235 * @var text
236 */
237 public $thankyou_text;
238 /**
239 * 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.
240 *
241 * @var text
242 */
243 public $thankyou_footer;
244 /**
245 * if true, signup is done on behalf of an organization
246 *
247 * @var boolean
248 */
249 public $is_for_organization;
250 /**
251 * This text field is shown when is_for_organization is checked. For example - I am contributing on behalf on an organization.
252 *
253 * @var text
254 */
255 public $for_organization;
256 /**
257 * if true, receipt is automatically emailed to contact on success
258 *
259 * @var boolean
260 */
261 public $is_email_receipt;
262 /**
263 * FROM email name used for receipts generated by contributions to this contribution page.
264 *
265 * @var string
266 */
267 public $receipt_from_name;
268 /**
269 * FROM email address used for receipts generated by contributions to this contribution page.
270 *
271 * @var string
272 */
273 public $receipt_from_email;
274 /**
275 * comma-separated list of email addresses to cc each time a receipt is sent
276 *
277 * @var string
278 */
279 public $cc_receipt;
280 /**
281 * comma-separated list of email addresses to bcc each time a receipt is sent
282 *
283 * @var string
284 */
285 public $bcc_receipt;
286 /**
287 * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
288 *
289 * @var text
290 */
291 public $receipt_text;
292 /**
293 * Is this property active?
294 *
295 * @var boolean
296 */
297 public $is_active;
298 /**
299 * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
300 *
301 * @var text
302 */
303 public $footer_text;
304 /**
305 * Is this property active?
306 *
307 * @var boolean
308 */
309 public $amount_block_is_active;
310 /**
311 * Date and time that this page starts.
312 *
313 * @var datetime
314 */
315 public $start_date;
316 /**
317 * Date and time that this page ends. May be NULL if no defined end date/time
318 *
319 * @var datetime
320 */
321 public $end_date;
322 /**
323 * FK to civicrm_contact, who created this contribution page
324 *
325 * @var int unsigned
326 */
327 public $created_id;
328 /**
329 * Date and time that contribution page was created.
330 *
331 * @var datetime
332 */
333 public $created_date;
334 /**
335 * 3 character string, value from config setting or input via user.
336 *
337 * @var string
338 */
339 public $currency;
340 /**
341 * The campaign for which we are collecting contributions with this page.
342 *
343 * @var int unsigned
344 */
345 public $campaign_id;
346 /**
347 * Can people share the contribution page through social media?
348 *
349 * @var boolean
350 */
351 public $is_share;
352 /**
353 * if true - billing block is required for online contribution page
354 *
355 * @var boolean
356 */
357 public $is_billing_required;
358 /**
359 * class constructor
360 *
361 * @return civicrm_contribution_page
362 */
363 function __construct() {
364 $this->__table = 'civicrm_contribution_page';
365 parent::__construct();
366 }
367 /**
368 * Returns foreign keys and entity references
369 *
370 * @return array
371 * [CRM_Core_Reference_Interface]
372 */
373 static function getReferenceColumns() {
374 if (!self::$_links) {
375 self::$_links = static ::createReferenceColumns(__CLASS__);
376 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
377 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
378 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
379 }
380 return self::$_links;
381 }
382 /**
383 * Returns all the column names of this table
384 *
385 * @return array
386 */
387 static function &fields() {
388 if (!(self::$_fields)) {
389 self::$_fields = array(
390 'id' => array(
391 'name' => 'id',
392 'type' => CRM_Utils_Type::T_INT,
393 'title' => ts('Contribution Page ID') ,
394 'description' => 'Contribution Id',
395 'required' => true,
396 ) ,
397 'title' => array(
398 'name' => 'title',
399 'type' => CRM_Utils_Type::T_STRING,
400 'title' => ts('Contribution Page Title') ,
401 'description' => 'Contribution Page title. For top of page display',
402 'maxlength' => 255,
403 'size' => CRM_Utils_Type::HUGE,
404 ) ,
405 'intro_text' => array(
406 'name' => 'intro_text',
407 'type' => CRM_Utils_Type::T_TEXT,
408 'title' => ts('Contribution Page Introduction Text') ,
409 'description' => 'Text and html allowed. Displayed below title.',
410 'rows' => 6,
411 'cols' => 50,
412 'html' => array(
413 'type' => 'TextArea',
414 ) ,
415 ) ,
416 'financial_type_id' => array(
417 'name' => 'financial_type_id',
418 'type' => CRM_Utils_Type::T_INT,
419 'title' => ts('Financial Type') ,
420 'description' => 'default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
421 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
422 'html' => array(
423 'type' => 'Select',
424 ) ,
425 'pseudoconstant' => array(
426 'table' => 'civicrm_financial_type',
427 'keyColumn' => 'id',
428 'labelColumn' => 'name',
429 )
430 ) ,
431 'payment_processor' => array(
432 'name' => 'payment_processor',
433 'type' => CRM_Utils_Type::T_STRING,
434 'title' => ts('Payment Processor') ,
435 'description' => 'Payment Processors configured for this contribution Page',
436 'maxlength' => 128,
437 'size' => CRM_Utils_Type::HUGE,
438 'html' => array(
439 'type' => 'Select',
440 ) ,
441 'pseudoconstant' => array(
442 'table' => 'civicrm_payment_processor',
443 'keyColumn' => 'id',
444 'labelColumn' => 'name',
445 )
446 ) ,
447 'is_credit_card_only' => array(
448 'name' => 'is_credit_card_only',
449 'type' => CRM_Utils_Type::T_BOOLEAN,
450 'title' => ts('Is Credit Card Only?') ,
451 'description' => 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
452 ) ,
453 'is_monetary' => array(
454 'name' => 'is_monetary',
455 'type' => CRM_Utils_Type::T_BOOLEAN,
456 'title' => ts('Is Monetary') ,
457 'description' => 'if true - allows real-time monetary transactions otherwise non-monetary transactions',
458 'default' => '1',
459 ) ,
460 'is_recur' => array(
461 'name' => 'is_recur',
462 'type' => CRM_Utils_Type::T_BOOLEAN,
463 'title' => ts('Is Recurring') ,
464 'description' => 'if true - allows recurring contributions, valid only for PayPal_Standard',
465 ) ,
466 'is_confirm_enabled' => array(
467 'name' => 'is_confirm_enabled',
468 'type' => CRM_Utils_Type::T_BOOLEAN,
469 'title' => ts('Confirmation Page?') ,
470 'description' => 'if false, the confirm page in contribution pages gets skipped',
471 'default' => '1',
472 ) ,
473 'recur_frequency_unit' => array(
474 'name' => 'recur_frequency_unit',
475 'type' => CRM_Utils_Type::T_STRING,
476 'title' => ts('Recurring Frequency') ,
477 'description' => 'Supported recurring frequency units.',
478 'maxlength' => 128,
479 'size' => CRM_Utils_Type::HUGE,
480 ) ,
481 'is_recur_interval' => array(
482 'name' => 'is_recur_interval',
483 'type' => CRM_Utils_Type::T_BOOLEAN,
484 'title' => ts('Support Recurring Intervals') ,
485 'description' => 'if true - supports recurring intervals',
486 ) ,
487 'is_recur_installments' => array(
488 'name' => 'is_recur_installments',
489 'type' => CRM_Utils_Type::T_BOOLEAN,
490 'title' => ts('Recurring Installments?') ,
491 'description' => 'if true - asks user for recurring installments',
492 ) ,
493 'is_pay_later' => array(
494 'name' => 'is_pay_later',
495 'type' => CRM_Utils_Type::T_BOOLEAN,
496 'title' => ts('Pay Later') ,
497 'description' => 'if true - allows the user to send payment directly to the org later',
498 ) ,
499 'pay_later_text' => array(
500 'name' => 'pay_later_text',
501 'type' => CRM_Utils_Type::T_TEXT,
502 'title' => ts('Pay Later Text') ,
503 'description' => 'The text displayed to the user in the main form',
504 ) ,
505 'pay_later_receipt' => array(
506 'name' => 'pay_later_receipt',
507 'type' => CRM_Utils_Type::T_TEXT,
508 'title' => ts('Pay Later Receipt') ,
509 'description' => 'The receipt sent to the user instead of the normal receipt text',
510 ) ,
511 'is_partial_payment' => array(
512 'name' => 'is_partial_payment',
513 'type' => CRM_Utils_Type::T_BOOLEAN,
514 'title' => ts('Allow Partial Payment') ,
515 'description' => 'is partial payment enabled for this online contribution page',
516 ) ,
517 'initial_amount_label' => array(
518 'name' => 'initial_amount_label',
519 'type' => CRM_Utils_Type::T_STRING,
520 'title' => ts('Initial Amount Label') ,
521 'description' => 'Initial amount label for partial payment',
522 'maxlength' => 255,
523 'size' => CRM_Utils_Type::HUGE,
524 ) ,
525 'initial_amount_help_text' => array(
526 'name' => 'initial_amount_help_text',
527 'type' => CRM_Utils_Type::T_TEXT,
528 'title' => ts('Initial Amount Help Text') ,
529 'description' => 'Initial amount help text for partial payment',
530 ) ,
531 'min_initial_amount' => array(
532 'name' => 'min_initial_amount',
533 'type' => CRM_Utils_Type::T_MONEY,
534 'title' => ts('Min Initial Amount') ,
535 'description' => 'Minimum initial amount for partial payment',
536 'precision' => array(
537 20,
538 2
539 ) ,
540 ) ,
541 'is_allow_other_amount' => array(
542 'name' => 'is_allow_other_amount',
543 'type' => CRM_Utils_Type::T_BOOLEAN,
544 'title' => ts('Allow Other Amounts') ,
545 'description' => 'if true, page will include an input text field where user can enter their own amount',
546 ) ,
547 'default_amount_id' => array(
548 'name' => 'default_amount_id',
549 'type' => CRM_Utils_Type::T_INT,
550 'title' => ts('Default Amount') ,
551 'description' => 'FK to civicrm_option_value.',
552 ) ,
553 'min_amount' => array(
554 'name' => 'min_amount',
555 'type' => CRM_Utils_Type::T_MONEY,
556 'title' => ts('Minimum Amount') ,
557 'description' => 'if other amounts allowed, user can configure minimum allowed.',
558 'precision' => array(
559 20,
560 2
561 ) ,
562 ) ,
563 'max_amount' => array(
564 'name' => 'max_amount',
565 'type' => CRM_Utils_Type::T_MONEY,
566 'title' => ts('Maximum Amount') ,
567 'description' => 'if other amounts allowed, user can configure maximum allowed.',
568 'precision' => array(
569 20,
570 2
571 ) ,
572 ) ,
573 'goal_amount' => array(
574 'name' => 'goal_amount',
575 'type' => CRM_Utils_Type::T_MONEY,
576 'title' => ts('Goal Amount') ,
577 'description' => 'The target goal for this page, allows people to build a goal meter',
578 'precision' => array(
579 20,
580 2
581 ) ,
582 ) ,
583 'thankyou_title' => array(
584 'name' => 'thankyou_title',
585 'type' => CRM_Utils_Type::T_STRING,
586 'title' => ts('Thank-you Title') ,
587 'description' => 'Title for Thank-you page (header title tag, and display at the top of the page).',
588 'maxlength' => 255,
589 'size' => CRM_Utils_Type::HUGE,
590 ) ,
591 'thankyou_text' => array(
592 'name' => 'thankyou_text',
593 'type' => CRM_Utils_Type::T_TEXT,
594 'title' => ts('Thank-you Text') ,
595 'description' => 'text and html allowed. displayed above result on success page',
596 'rows' => 8,
597 'cols' => 60,
598 'html' => array(
599 'type' => 'TextArea',
600 ) ,
601 ) ,
602 'thankyou_footer' => array(
603 'name' => 'thankyou_footer',
604 'type' => CRM_Utils_Type::T_TEXT,
605 'title' => ts('Thank-you Footer') ,
606 '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.',
607 'rows' => 8,
608 'cols' => 60,
609 'html' => array(
610 'type' => 'TextArea',
611 ) ,
612 ) ,
613 'is_for_organization' => array(
614 'name' => 'is_for_organization',
615 'type' => CRM_Utils_Type::T_BOOLEAN,
616 'title' => ts('Allow For Organization') ,
617 'description' => 'if true, signup is done on behalf of an organization',
618 ) ,
619 'for_organization' => array(
620 'name' => 'for_organization',
621 'type' => CRM_Utils_Type::T_TEXT,
622 'title' => ts('On Behalf Of Organization') ,
623 'description' => 'This text field is shown when is_for_organization is checked. For example - I am contributing on behalf on an organization.',
624 'rows' => 2,
625 'cols' => 50,
626 'html' => array(
627 'type' => 'TextArea',
628 ) ,
629 ) ,
630 'is_email_receipt' => array(
631 'name' => 'is_email_receipt',
632 'type' => CRM_Utils_Type::T_BOOLEAN,
633 'title' => ts('Send email Receipt') ,
634 'description' => 'if true, receipt is automatically emailed to contact on success',
635 ) ,
636 'receipt_from_name' => array(
637 'name' => 'receipt_from_name',
638 'type' => CRM_Utils_Type::T_STRING,
639 'title' => ts('Receipt From') ,
640 'description' => 'FROM email name used for receipts generated by contributions to this contribution page.',
641 'maxlength' => 255,
642 'size' => CRM_Utils_Type::HUGE,
643 ) ,
644 'receipt_from_email' => array(
645 'name' => 'receipt_from_email',
646 'type' => CRM_Utils_Type::T_STRING,
647 'title' => ts('Receipt From email') ,
648 'description' => 'FROM email address used for receipts generated by contributions to this contribution page.',
649 'maxlength' => 255,
650 'size' => CRM_Utils_Type::HUGE,
651 ) ,
652 'cc_receipt' => array(
653 'name' => 'cc_receipt',
654 'type' => CRM_Utils_Type::T_STRING,
655 'title' => ts('Receipt cc') ,
656 'description' => 'comma-separated list of email addresses to cc each time a receipt is sent',
657 'maxlength' => 255,
658 'size' => CRM_Utils_Type::HUGE,
659 ) ,
660 'bcc_receipt' => array(
661 'name' => 'bcc_receipt',
662 'type' => CRM_Utils_Type::T_STRING,
663 'title' => ts('Receipt bcc') ,
664 'description' => 'comma-separated list of email addresses to bcc each time a receipt is sent',
665 'maxlength' => 255,
666 'size' => CRM_Utils_Type::HUGE,
667 ) ,
668 'receipt_text' => array(
669 'name' => 'receipt_text',
670 'type' => CRM_Utils_Type::T_TEXT,
671 'title' => ts('Receipt Text') ,
672 'description' => 'text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now',
673 'rows' => 6,
674 'cols' => 50,
675 'html' => array(
676 'type' => 'TextArea',
677 ) ,
678 ) ,
679 'is_active' => array(
680 'name' => 'is_active',
681 'type' => CRM_Utils_Type::T_BOOLEAN,
682 'title' => ts('Is Page Active?') ,
683 'description' => 'Is this property active?',
684 ) ,
685 'footer_text' => array(
686 'name' => 'footer_text',
687 'type' => CRM_Utils_Type::T_TEXT,
688 'title' => ts('Footer Text') ,
689 'description' => 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.',
690 'rows' => 6,
691 'cols' => 50,
692 'html' => array(
693 'type' => 'TextArea',
694 ) ,
695 ) ,
696 'amount_block_is_active' => array(
697 'name' => 'amount_block_is_active',
698 'type' => CRM_Utils_Type::T_BOOLEAN,
699 'title' => ts('Is Amount Block Active?') ,
700 'description' => 'Is this property active?',
701 'default' => '1',
702 ) ,
703 'start_date' => array(
704 'name' => 'start_date',
705 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
706 'title' => ts('Contribution Page Start Date') ,
707 'description' => 'Date and time that this page starts.',
708 ) ,
709 'end_date' => array(
710 'name' => 'end_date',
711 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
712 'title' => ts('Contribution Page End Date') ,
713 'description' => 'Date and time that this page ends. May be NULL if no defined end date/time',
714 ) ,
715 'created_id' => array(
716 'name' => 'created_id',
717 'type' => CRM_Utils_Type::T_INT,
718 'title' => ts('Contribution Page Created By') ,
719 'description' => 'FK to civicrm_contact, who created this contribution page',
720 'FKClassName' => 'CRM_Contact_DAO_Contact',
721 ) ,
722 'created_date' => array(
723 'name' => 'created_date',
724 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
725 'title' => ts('Contribution Page Created Date') ,
726 'description' => 'Date and time that contribution page was created.',
727 ) ,
728 'currency' => array(
729 'name' => 'currency',
730 'type' => CRM_Utils_Type::T_STRING,
731 'title' => ts('Contribution Page Currency') ,
732 'description' => '3 character string, value from config setting or input via user.',
733 'maxlength' => 3,
734 'size' => CRM_Utils_Type::FOUR,
735 'default' => 'NULL',
736 'html' => array(
737 'type' => 'Select',
738 ) ,
739 'pseudoconstant' => array(
740 'table' => 'civicrm_currency',
741 'keyColumn' => 'name',
742 'labelColumn' => 'full_name',
743 'nameColumn' => 'numeric_code',
744 )
745 ) ,
746 'campaign_id' => array(
747 'name' => 'campaign_id',
748 'type' => CRM_Utils_Type::T_INT,
749 'title' => ts('Contribution Page Campaign ID') ,
750 'description' => 'The campaign for which we are collecting contributions with this page.',
751 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
752 'pseudoconstant' => array(
753 'table' => 'civicrm_campaign',
754 'keyColumn' => 'id',
755 'labelColumn' => 'title',
756 )
757 ) ,
758 'is_share' => array(
759 'name' => 'is_share',
760 'type' => CRM_Utils_Type::T_BOOLEAN,
761 'title' => ts('Is Contribution Page Shared?') ,
762 'description' => 'Can people share the contribution page through social media?',
763 'default' => '1',
764 ) ,
765 'is_billing_required' => array(
766 'name' => 'is_billing_required',
767 'type' => CRM_Utils_Type::T_BOOLEAN,
768 'title' => ts('Is billing block required') ,
769 'description' => 'if true - billing block is required for online contribution page',
770 ) ,
771 );
772 }
773 return self::$_fields;
774 }
775 /**
776 * Returns an array containing, for each field, the arary key used for that
777 * field in self::$_fields.
778 *
779 * @return array
780 */
781 static function &fieldKeys() {
782 if (!(self::$_fieldKeys)) {
783 self::$_fieldKeys = array(
784 'id' => 'id',
785 'title' => 'title',
786 'intro_text' => 'intro_text',
787 'financial_type_id' => 'financial_type_id',
788 'payment_processor' => 'payment_processor',
789 'is_credit_card_only' => 'is_credit_card_only',
790 'is_monetary' => 'is_monetary',
791 'is_recur' => 'is_recur',
792 'is_confirm_enabled' => 'is_confirm_enabled',
793 'recur_frequency_unit' => 'recur_frequency_unit',
794 'is_recur_interval' => 'is_recur_interval',
795 'is_recur_installments' => 'is_recur_installments',
796 'is_pay_later' => 'is_pay_later',
797 'pay_later_text' => 'pay_later_text',
798 'pay_later_receipt' => 'pay_later_receipt',
799 'is_partial_payment' => 'is_partial_payment',
800 'initial_amount_label' => 'initial_amount_label',
801 'initial_amount_help_text' => 'initial_amount_help_text',
802 'min_initial_amount' => 'min_initial_amount',
803 'is_allow_other_amount' => 'is_allow_other_amount',
804 'default_amount_id' => 'default_amount_id',
805 'min_amount' => 'min_amount',
806 'max_amount' => 'max_amount',
807 'goal_amount' => 'goal_amount',
808 'thankyou_title' => 'thankyou_title',
809 'thankyou_text' => 'thankyou_text',
810 'thankyou_footer' => 'thankyou_footer',
811 'is_for_organization' => 'is_for_organization',
812 'for_organization' => 'for_organization',
813 'is_email_receipt' => 'is_email_receipt',
814 'receipt_from_name' => 'receipt_from_name',
815 'receipt_from_email' => 'receipt_from_email',
816 'cc_receipt' => 'cc_receipt',
817 'bcc_receipt' => 'bcc_receipt',
818 'receipt_text' => 'receipt_text',
819 'is_active' => 'is_active',
820 'footer_text' => 'footer_text',
821 'amount_block_is_active' => 'amount_block_is_active',
822 'start_date' => 'start_date',
823 'end_date' => 'end_date',
824 'created_id' => 'created_id',
825 'created_date' => 'created_date',
826 'currency' => 'currency',
827 'campaign_id' => 'campaign_id',
828 'is_share' => 'is_share',
829 'is_billing_required' => 'is_billing_required',
830 );
831 }
832 return self::$_fieldKeys;
833 }
834 /**
835 * Returns the names of this table
836 *
837 * @return string
838 */
839 static function getTableName() {
840 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
841 }
842 /**
843 * Returns if this table needs to be logged
844 *
845 * @return boolean
846 */
847 function getLog() {
848 return self::$_log;
849 }
850 /**
851 * Returns the list of fields that can be imported
852 *
853 * @param bool $prefix
854 *
855 * @return array
856 */
857 static function &import($prefix = false) {
858 if (!(self::$_import)) {
859 self::$_import = array();
860 $fields = self::fields();
861 foreach($fields as $name => $field) {
862 if (CRM_Utils_Array::value('import', $field)) {
863 if ($prefix) {
864 self::$_import['contribution_page'] = & $fields[$name];
865 } else {
866 self::$_import[$name] = & $fields[$name];
867 }
868 }
869 }
870 }
871 return self::$_import;
872 }
873 /**
874 * Returns the list of fields that can be exported
875 *
876 * @param bool $prefix
877 *
878 * @return array
879 */
880 static function &export($prefix = false) {
881 if (!(self::$_export)) {
882 self::$_export = array();
883 $fields = self::fields();
884 foreach($fields as $name => $field) {
885 if (CRM_Utils_Array::value('export', $field)) {
886 if ($prefix) {
887 self::$_export['contribution_page'] = & $fields[$name];
888 } else {
889 self::$_export[$name] = & $fields[$name];
890 }
891 }
892 }
893 }
894 return self::$_export;
895 }
896 }