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