Commit | Line | Data |
---|---|---|
e501603b TO |
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 | |
437fafcf | 33 | * (GenCodeChecksum:4948188e5ba353c75f5c3fe00e67a5ea) |
e501603b TO |
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; | |
e501603b TO |
50 | /** |
51 | * static instance to hold the FK relationships | |
52 | * | |
53 | * @var string | |
54 | */ | |
55 | static $_links = null; | |
e501603b TO |
56 | /** |
57 | * static value to see if we should log any modifications to | |
58 | * this table in the civicrm_log table | |
59 | * | |
60 | * @var boolean | |
61 | */ | |
62 | static $_log = true; | |
63 | /** | |
64 | * Contribution Id | |
65 | * | |
66 | * @var int unsigned | |
67 | */ | |
68 | public $id; | |
69 | /** | |
70 | * Contribution Page title. For top of page display | |
71 | * | |
72 | * @var string | |
73 | */ | |
74 | public $title; | |
75 | /** | |
76 | * Text and html allowed. Displayed below title. | |
77 | * | |
78 | * @var text | |
79 | */ | |
80 | public $intro_text; | |
81 | /** | |
82 | * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution | |
83 | * | |
84 | * @var int unsigned | |
85 | */ | |
86 | public $financial_type_id; | |
87 | /** | |
88 | * Payment Processors configured for this contribution Page | |
89 | * | |
90 | * @var string | |
91 | */ | |
92 | public $payment_processor; | |
93 | /** | |
94 | * if true - processing logic must reject transaction at confirmation stage if pay method != credit card | |
95 | * | |
96 | * @var boolean | |
97 | */ | |
98 | public $is_credit_card_only; | |
99 | /** | |
100 | * if true - allows real-time monetary transactions otherwise non-monetary transactions | |
101 | * | |
102 | * @var boolean | |
103 | */ | |
104 | public $is_monetary; | |
105 | /** | |
106 | * if true - allows recurring contributions, valid only for PayPal_Standard | |
107 | * | |
108 | * @var boolean | |
109 | */ | |
110 | public $is_recur; | |
111 | /** | |
112 | * if false, the confirm page in contribution pages gets skipped | |
113 | * | |
114 | * @var boolean | |
115 | */ | |
116 | public $is_confirm_enabled; | |
117 | /** | |
118 | * Supported recurring frequency units. | |
119 | * | |
120 | * @var string | |
121 | */ | |
122 | public $recur_frequency_unit; | |
123 | /** | |
124 | * if true - supports recurring intervals | |
125 | * | |
126 | * @var boolean | |
127 | */ | |
128 | public $is_recur_interval; | |
129 | /** | |
130 | * if true - asks user for recurring installments | |
131 | * | |
132 | * @var boolean | |
133 | */ | |
134 | public $is_recur_installments; | |
135 | /** | |
136 | * if true - user is able to adjust payment start date | |
137 | * | |
138 | * @var boolean | |
139 | */ | |
140 | public $adjust_recur_start_date; | |
141 | /** | |
142 | * if true - allows the user to send payment directly to the org later | |
143 | * | |
144 | * @var boolean | |
145 | */ | |
146 | public $is_pay_later; | |
147 | /** | |
148 | * The text displayed to the user in the main form | |
149 | * | |
150 | * @var text | |
151 | */ | |
152 | public $pay_later_text; | |
153 | /** | |
154 | * The receipt sent to the user instead of the normal receipt text | |
155 | * | |
156 | * @var text | |
157 | */ | |
158 | public $pay_later_receipt; | |
159 | /** | |
160 | * is partial payment enabled for this online contribution page | |
161 | * | |
162 | * @var boolean | |
163 | */ | |
164 | public $is_partial_payment; | |
165 | /** | |
166 | * Initial amount label for partial payment | |
167 | * | |
168 | * @var string | |
169 | */ | |
170 | public $initial_amount_label; | |
171 | /** | |
172 | * Initial amount help text for partial payment | |
173 | * | |
174 | * @var text | |
175 | */ | |
176 | public $initial_amount_help_text; | |
177 | /** | |
178 | * Minimum initial amount for partial payment | |
179 | * | |
180 | * @var float | |
181 | */ | |
182 | public $min_initial_amount; | |
183 | /** | |
184 | * if true, page will include an input text field where user can enter their own amount | |
185 | * | |
186 | * @var boolean | |
187 | */ | |
188 | public $is_allow_other_amount; | |
189 | /** | |
190 | * FK to civicrm_option_value. | |
191 | * | |
192 | * @var int unsigned | |
193 | */ | |
194 | public $default_amount_id; | |
195 | /** | |
196 | * if other amounts allowed, user can configure minimum allowed. | |
197 | * | |
198 | * @var float | |
199 | */ | |
200 | public $min_amount; | |
201 | /** | |
202 | * if other amounts allowed, user can configure maximum allowed. | |
203 | * | |
204 | * @var float | |
205 | */ | |
206 | public $max_amount; | |
207 | /** | |
208 | * The target goal for this page, allows people to build a goal meter | |
209 | * | |
210 | * @var float | |
211 | */ | |
212 | public $goal_amount; | |
213 | /** | |
214 | * Title for Thank-you page (header title tag, and display at the top of the page). | |
215 | * | |
216 | * @var string | |
217 | */ | |
218 | public $thankyou_title; | |
219 | /** | |
220 | * text and html allowed. displayed above result on success page | |
221 | * | |
222 | * @var text | |
223 | */ | |
224 | public $thankyou_text; | |
225 | /** | |
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. | |
227 | * | |
228 | * @var text | |
229 | */ | |
230 | public $thankyou_footer; | |
231 | /** | |
232 | * if true, receipt is automatically emailed to contact on success | |
233 | * | |
234 | * @var boolean | |
235 | */ | |
236 | public $is_email_receipt; | |
237 | /** | |
238 | * FROM email name used for receipts generated by contributions to this contribution page. | |
239 | * | |
240 | * @var string | |
241 | */ | |
242 | public $receipt_from_name; | |
243 | /** | |
244 | * FROM email address used for receipts generated by contributions to this contribution page. | |
245 | * | |
246 | * @var string | |
247 | */ | |
248 | public $receipt_from_email; | |
249 | /** | |
250 | * comma-separated list of email addresses to cc each time a receipt is sent | |
251 | * | |
252 | * @var string | |
253 | */ | |
254 | public $cc_receipt; | |
255 | /** | |
256 | * comma-separated list of email addresses to bcc each time a receipt is sent | |
257 | * | |
258 | * @var string | |
259 | */ | |
260 | public $bcc_receipt; | |
261 | /** | |
262 | * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now | |
263 | * | |
264 | * @var text | |
265 | */ | |
266 | public $receipt_text; | |
267 | /** | |
268 | * Is this property active? | |
269 | * | |
270 | * @var boolean | |
271 | */ | |
272 | public $is_active; | |
273 | /** | |
274 | * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard. | |
275 | * | |
276 | * @var text | |
277 | */ | |
278 | public $footer_text; | |
279 | /** | |
280 | * Is this property active? | |
281 | * | |
282 | * @var boolean | |
283 | */ | |
284 | public $amount_block_is_active; | |
285 | /** | |
286 | * Date and time that this page starts. | |
287 | * | |
288 | * @var datetime | |
289 | */ | |
290 | public $start_date; | |
291 | /** | |
292 | * Date and time that this page ends. May be NULL if no defined end date/time | |
293 | * | |
294 | * @var datetime | |
295 | */ | |
296 | public $end_date; | |
297 | /** | |
298 | * FK to civicrm_contact, who created this contribution page | |
299 | * | |
300 | * @var int unsigned | |
301 | */ | |
302 | public $created_id; | |
303 | /** | |
304 | * Date and time that contribution page was created. | |
305 | * | |
306 | * @var datetime | |
307 | */ | |
308 | public $created_date; | |
309 | /** | |
310 | * 3 character string, value from config setting or input via user. | |
311 | * | |
312 | * @var string | |
313 | */ | |
314 | public $currency; | |
315 | /** | |
316 | * The campaign for which we are collecting contributions with this page. | |
317 | * | |
318 | * @var int unsigned | |
319 | */ | |
320 | public $campaign_id; | |
321 | /** | |
322 | * Can people share the contribution page through social media? | |
323 | * | |
324 | * @var boolean | |
325 | */ | |
326 | public $is_share; | |
327 | /** | |
328 | * if true - billing block is required for online contribution page | |
329 | * | |
330 | * @var boolean | |
331 | */ | |
332 | public $is_billing_required; | |
333 | /** | |
334 | * class constructor | |
335 | * | |
336 | * @return civicrm_contribution_page | |
337 | */ | |
338 | function __construct() { | |
339 | $this->__table = 'civicrm_contribution_page'; | |
340 | parent::__construct(); | |
341 | } | |
342 | /** | |
343 | * Returns foreign keys and entity references | |
344 | * | |
345 | * @return array | |
346 | * [CRM_Core_Reference_Interface] | |
347 | */ | |
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'); | |
354 | } | |
355 | return self::$_links; | |
356 | } | |
357 | /** | |
358 | * Returns all the column names of this table | |
359 | * | |
360 | * @return array | |
361 | */ | |
362 | static function &fields() { | |
363 | if (!(self::$_fields)) { | |
364 | self::$_fields = array( | |
365 | 'id' => array( | |
366 | 'name' => 'id', | |
367 | 'type' => CRM_Utils_Type::T_INT, | |
368 | 'title' => ts('Contribution Page ID') , | |
369 | 'description' => 'Contribution Id', | |
370 | 'required' => true, | |
371 | ) , | |
372 | 'title' => array( | |
373 | 'name' => 'title', | |
374 | 'type' => CRM_Utils_Type::T_STRING, | |
375 | 'title' => ts('Contribution Page Title') , | |
376 | 'description' => 'Contribution Page title. For top of page display', | |
377 | 'maxlength' => 255, | |
378 | 'size' => CRM_Utils_Type::HUGE, | |
379 | ) , | |
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.', | |
385 | 'rows' => 6, | |
386 | 'cols' => 50, | |
387 | 'html' => array( | |
388 | 'type' => 'RichTextEditor', | |
389 | ) , | |
390 | ) , | |
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', | |
397 | 'html' => array( | |
398 | 'type' => 'Select', | |
399 | ) , | |
400 | 'pseudoconstant' => array( | |
401 | 'table' => 'civicrm_financial_type', | |
402 | 'keyColumn' => 'id', | |
403 | 'labelColumn' => 'name', | |
404 | ) | |
405 | ) , | |
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', | |
411 | 'maxlength' => 128, | |
412 | 'size' => CRM_Utils_Type::HUGE, | |
413 | 'html' => array( | |
414 | 'type' => 'Select', | |
415 | ) , | |
416 | 'pseudoconstant' => array( | |
417 | 'table' => 'civicrm_payment_processor', | |
418 | 'keyColumn' => 'id', | |
419 | 'labelColumn' => 'name', | |
420 | ) | |
421 | ) , | |
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', | |
427 | ) , | |
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', | |
433 | 'default' => '1', | |
434 | ) , | |
435 | 'is_recur' => array( | |
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', | |
440 | ) , | |
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', | |
446 | 'default' => '1', | |
447 | ) , | |
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.', | |
453 | 'maxlength' => 128, | |
454 | 'size' => CRM_Utils_Type::HUGE, | |
455 | ) , | |
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', | |
461 | ) , | |
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', | |
467 | ) , | |
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', | |
473 | ) , | |
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', | |
479 | ) , | |
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', | |
485 | ) , | |
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', | |
491 | ) , | |
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', | |
497 | ) , | |
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', | |
503 | 'maxlength' => 255, | |
504 | 'size' => CRM_Utils_Type::HUGE, | |
505 | ) , | |
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', | |
511 | ) , | |
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( | |
518 | 20, | |
519 | 2 | |
520 | ) , | |
521 | ) , | |
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', | |
527 | ) , | |
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.', | |
533 | ) , | |
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( | |
540 | 20, | |
541 | 2 | |
542 | ) , | |
543 | ) , | |
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( | |
550 | 20, | |
551 | 2 | |
552 | ) , | |
553 | ) , | |
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( | |
560 | 20, | |
561 | 2 | |
562 | ) , | |
563 | ) , | |
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).', | |
569 | 'maxlength' => 255, | |
570 | 'size' => CRM_Utils_Type::HUGE, | |
571 | ) , | |
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', | |
577 | 'rows' => 8, | |
578 | 'cols' => 60, | |
579 | 'html' => array( | |
580 | 'type' => 'RichTextEditor', | |
581 | ) , | |
582 | ) , | |
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.', | |
588 | 'rows' => 8, | |
589 | 'cols' => 60, | |
590 | 'html' => array( | |
591 | 'type' => 'RichTextEditor', | |
592 | ) , | |
593 | ) , | |
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', | |
599 | ) , | |
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.', | |
605 | 'maxlength' => 255, | |
606 | 'size' => CRM_Utils_Type::HUGE, | |
607 | ) , | |
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.', | |
613 | 'maxlength' => 255, | |
614 | 'size' => CRM_Utils_Type::HUGE, | |
615 | ) , | |
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', | |
621 | 'maxlength' => 255, | |
622 | 'size' => CRM_Utils_Type::HUGE, | |
623 | ) , | |
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', | |
629 | 'maxlength' => 255, | |
630 | 'size' => CRM_Utils_Type::HUGE, | |
631 | ) , | |
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', | |
637 | 'rows' => 6, | |
638 | 'cols' => 50, | |
639 | 'html' => array( | |
640 | 'type' => 'TextArea', | |
641 | ) , | |
642 | ) , | |
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?', | |
648 | ) , | |
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.', | |
654 | 'rows' => 6, | |
655 | 'cols' => 50, | |
656 | 'html' => array( | |
657 | 'type' => 'RichTextEditor', | |
658 | ) , | |
659 | ) , | |
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?', | |
665 | 'default' => '1', | |
666 | ) , | |
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.', | |
672 | ) , | |
673 | 'end_date' => array( | |
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', | |
678 | ) , | |
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', | |
685 | ) , | |
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.', | |
691 | ) , | |
692 | 'currency' => array( | |
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.', | |
697 | 'maxlength' => 3, | |
698 | 'size' => CRM_Utils_Type::FOUR, | |
699 | 'default' => 'NULL', | |
700 | 'html' => array( | |
701 | 'type' => 'Select', | |
702 | ) , | |
703 | 'pseudoconstant' => array( | |
704 | 'table' => 'civicrm_currency', | |
705 | 'keyColumn' => 'name', | |
706 | 'labelColumn' => 'full_name', | |
707 | 'nameColumn' => 'name', | |
708 | ) | |
709 | ) , | |
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', | |
718 | 'keyColumn' => 'id', | |
719 | 'labelColumn' => 'title', | |
720 | ) | |
721 | ) , | |
722 | 'is_share' => array( | |
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?', | |
727 | 'default' => '1', | |
728 | ) , | |
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', | |
734 | ) , | |
735 | ); | |
736 | } | |
737 | return self::$_fields; | |
738 | } | |
739 | /** | |
bd8e0b14 | 740 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
741 | * |
742 | * @return array | |
bd8e0b14 | 743 | * Array(string $name => string $uniqueName). |
e501603b TO |
744 | */ |
745 | static function &fieldKeys() { | |
bd8e0b14 TO |
746 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
747 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 748 | } |
bd8e0b14 | 749 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b TO |
750 | } |
751 | /** | |
752 | * Returns the names of this table | |
753 | * | |
754 | * @return string | |
755 | */ | |
756 | static function getTableName() { | |
757 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); | |
758 | } | |
759 | /** | |
760 | * Returns if this table needs to be logged | |
761 | * | |
762 | * @return boolean | |
763 | */ | |
764 | function getLog() { | |
765 | return self::$_log; | |
766 | } | |
767 | /** | |
768 | * Returns the list of fields that can be imported | |
769 | * | |
770 | * @param bool $prefix | |
771 | * | |
772 | * @return array | |
773 | */ | |
774 | static function &import($prefix = false) { | |
60808919 TO |
775 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_page', $prefix, array()); |
776 | return $r; | |
e501603b TO |
777 | } |
778 | /** | |
779 | * Returns the list of fields that can be exported | |
780 | * | |
781 | * @param bool $prefix | |
782 | * | |
783 | * @return array | |
784 | */ | |
785 | static function &export($prefix = false) { | |
60808919 TO |
786 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_page', $prefix, array()); |
787 | return $r; | |
e501603b TO |
788 | } |
789 | } |