Commit | Line | Data |
---|---|---|
e501603b TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
4 | | CiviCRM version 4.7 | | |
5 | +--------------------------------------------------------------------+ | |
0f03f337 | 6 | | Copyright CiviCRM LLC (c) 2004-2017 | |
e501603b TO |
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 | |
0f03f337 | 29 | * @copyright CiviCRM LLC (c) 2004-2017 |
e501603b TO |
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'; | |
e501603b TO |
44 | /** |
45 | * static value to see if we should log any modifications to | |
46 | * this table in the civicrm_log table | |
47 | * | |
48 | * @var boolean | |
49 | */ | |
50 | static $_log = true; | |
51 | /** | |
52 | * Contribution Id | |
53 | * | |
54 | * @var int unsigned | |
55 | */ | |
56 | public $id; | |
57 | /** | |
58 | * Contribution Page title. For top of page display | |
59 | * | |
60 | * @var string | |
61 | */ | |
62 | public $title; | |
63 | /** | |
64 | * Text and html allowed. Displayed below title. | |
65 | * | |
66 | * @var text | |
67 | */ | |
68 | public $intro_text; | |
69 | /** | |
70 | * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution | |
71 | * | |
72 | * @var int unsigned | |
73 | */ | |
74 | public $financial_type_id; | |
75 | /** | |
76 | * Payment Processors configured for this contribution Page | |
77 | * | |
78 | * @var string | |
79 | */ | |
80 | public $payment_processor; | |
81 | /** | |
82 | * if true - processing logic must reject transaction at confirmation stage if pay method != credit card | |
83 | * | |
84 | * @var boolean | |
85 | */ | |
86 | public $is_credit_card_only; | |
87 | /** | |
88 | * if true - allows real-time monetary transactions otherwise non-monetary transactions | |
89 | * | |
90 | * @var boolean | |
91 | */ | |
92 | public $is_monetary; | |
93 | /** | |
94 | * if true - allows recurring contributions, valid only for PayPal_Standard | |
95 | * | |
96 | * @var boolean | |
97 | */ | |
98 | public $is_recur; | |
99 | /** | |
100 | * if false, the confirm page in contribution pages gets skipped | |
101 | * | |
102 | * @var boolean | |
103 | */ | |
104 | public $is_confirm_enabled; | |
105 | /** | |
106 | * Supported recurring frequency units. | |
107 | * | |
108 | * @var string | |
109 | */ | |
110 | public $recur_frequency_unit; | |
111 | /** | |
112 | * if true - supports recurring intervals | |
113 | * | |
114 | * @var boolean | |
115 | */ | |
116 | public $is_recur_interval; | |
117 | /** | |
118 | * if true - asks user for recurring installments | |
119 | * | |
120 | * @var boolean | |
121 | */ | |
122 | public $is_recur_installments; | |
123 | /** | |
124 | * if true - user is able to adjust payment start date | |
125 | * | |
126 | * @var boolean | |
127 | */ | |
128 | public $adjust_recur_start_date; | |
129 | /** | |
130 | * if true - allows the user to send payment directly to the org later | |
131 | * | |
132 | * @var boolean | |
133 | */ | |
134 | public $is_pay_later; | |
135 | /** | |
136 | * The text displayed to the user in the main form | |
137 | * | |
138 | * @var text | |
139 | */ | |
140 | public $pay_later_text; | |
141 | /** | |
142 | * The receipt sent to the user instead of the normal receipt text | |
143 | * | |
144 | * @var text | |
145 | */ | |
146 | public $pay_later_receipt; | |
147 | /** | |
148 | * is partial payment enabled for this online contribution page | |
149 | * | |
150 | * @var boolean | |
151 | */ | |
152 | public $is_partial_payment; | |
153 | /** | |
154 | * Initial amount label for partial payment | |
155 | * | |
156 | * @var string | |
157 | */ | |
158 | public $initial_amount_label; | |
159 | /** | |
160 | * Initial amount help text for partial payment | |
161 | * | |
162 | * @var text | |
163 | */ | |
164 | public $initial_amount_help_text; | |
165 | /** | |
166 | * Minimum initial amount for partial payment | |
167 | * | |
168 | * @var float | |
169 | */ | |
170 | public $min_initial_amount; | |
171 | /** | |
172 | * if true, page will include an input text field where user can enter their own amount | |
173 | * | |
174 | * @var boolean | |
175 | */ | |
176 | public $is_allow_other_amount; | |
177 | /** | |
178 | * FK to civicrm_option_value. | |
179 | * | |
180 | * @var int unsigned | |
181 | */ | |
182 | public $default_amount_id; | |
183 | /** | |
184 | * if other amounts allowed, user can configure minimum allowed. | |
185 | * | |
186 | * @var float | |
187 | */ | |
188 | public $min_amount; | |
189 | /** | |
190 | * if other amounts allowed, user can configure maximum allowed. | |
191 | * | |
192 | * @var float | |
193 | */ | |
194 | public $max_amount; | |
195 | /** | |
196 | * The target goal for this page, allows people to build a goal meter | |
197 | * | |
198 | * @var float | |
199 | */ | |
200 | public $goal_amount; | |
201 | /** | |
202 | * Title for Thank-you page (header title tag, and display at the top of the page). | |
203 | * | |
204 | * @var string | |
205 | */ | |
206 | public $thankyou_title; | |
207 | /** | |
208 | * text and html allowed. displayed above result on success page | |
209 | * | |
210 | * @var text | |
211 | */ | |
212 | public $thankyou_text; | |
213 | /** | |
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. | |
215 | * | |
216 | * @var text | |
217 | */ | |
218 | public $thankyou_footer; | |
219 | /** | |
220 | * if true, receipt is automatically emailed to contact on success | |
221 | * | |
222 | * @var boolean | |
223 | */ | |
224 | public $is_email_receipt; | |
225 | /** | |
226 | * FROM email name used for receipts generated by contributions to this contribution page. | |
227 | * | |
228 | * @var string | |
229 | */ | |
230 | public $receipt_from_name; | |
231 | /** | |
232 | * FROM email address used for receipts generated by contributions to this contribution page. | |
233 | * | |
234 | * @var string | |
235 | */ | |
236 | public $receipt_from_email; | |
237 | /** | |
238 | * comma-separated list of email addresses to cc each time a receipt is sent | |
239 | * | |
240 | * @var string | |
241 | */ | |
242 | public $cc_receipt; | |
243 | /** | |
244 | * comma-separated list of email addresses to bcc each time a receipt is sent | |
245 | * | |
246 | * @var string | |
247 | */ | |
248 | public $bcc_receipt; | |
249 | /** | |
250 | * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now | |
251 | * | |
252 | * @var text | |
253 | */ | |
254 | public $receipt_text; | |
255 | /** | |
256 | * Is this property active? | |
257 | * | |
258 | * @var boolean | |
259 | */ | |
260 | public $is_active; | |
261 | /** | |
262 | * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard. | |
263 | * | |
264 | * @var text | |
265 | */ | |
266 | public $footer_text; | |
267 | /** | |
268 | * Is this property active? | |
269 | * | |
270 | * @var boolean | |
271 | */ | |
272 | public $amount_block_is_active; | |
273 | /** | |
274 | * Date and time that this page starts. | |
275 | * | |
276 | * @var datetime | |
277 | */ | |
278 | public $start_date; | |
279 | /** | |
280 | * Date and time that this page ends. May be NULL if no defined end date/time | |
281 | * | |
282 | * @var datetime | |
283 | */ | |
284 | public $end_date; | |
285 | /** | |
286 | * FK to civicrm_contact, who created this contribution page | |
287 | * | |
288 | * @var int unsigned | |
289 | */ | |
290 | public $created_id; | |
291 | /** | |
292 | * Date and time that contribution page was created. | |
293 | * | |
294 | * @var datetime | |
295 | */ | |
296 | public $created_date; | |
297 | /** | |
298 | * 3 character string, value from config setting or input via user. | |
299 | * | |
300 | * @var string | |
301 | */ | |
302 | public $currency; | |
303 | /** | |
304 | * The campaign for which we are collecting contributions with this page. | |
305 | * | |
306 | * @var int unsigned | |
307 | */ | |
308 | public $campaign_id; | |
309 | /** | |
310 | * Can people share the contribution page through social media? | |
311 | * | |
312 | * @var boolean | |
313 | */ | |
314 | public $is_share; | |
315 | /** | |
316 | * if true - billing block is required for online contribution page | |
317 | * | |
318 | * @var boolean | |
319 | */ | |
320 | public $is_billing_required; | |
321 | /** | |
322 | * class constructor | |
323 | * | |
324 | * @return civicrm_contribution_page | |
325 | */ | |
326 | function __construct() { | |
327 | $this->__table = 'civicrm_contribution_page'; | |
328 | parent::__construct(); | |
329 | } | |
330 | /** | |
331 | * Returns foreign keys and entity references | |
332 | * | |
333 | * @return array | |
334 | * [CRM_Core_Reference_Interface] | |
335 | */ | |
336 | static function getReferenceColumns() { | |
346aaaba TO |
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']); | |
e501603b | 343 | } |
346aaaba | 344 | return Civi::$statics[__CLASS__]['links']; |
e501603b TO |
345 | } |
346 | /** | |
347 | * Returns all the column names of this table | |
348 | * | |
349 | * @return array | |
350 | */ | |
351 | static function &fields() { | |
346aaaba TO |
352 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
353 | Civi::$statics[__CLASS__]['fields'] = array( | |
e501603b TO |
354 | 'id' => array( |
355 | 'name' => 'id', | |
356 | 'type' => CRM_Utils_Type::T_INT, | |
357 | 'title' => ts('Contribution Page ID') , | |
358 | 'description' => 'Contribution Id', | |
359 | 'required' => true, | |
360 | ) , | |
361 | 'title' => array( | |
362 | 'name' => 'title', | |
363 | 'type' => CRM_Utils_Type::T_STRING, | |
364 | 'title' => ts('Contribution Page Title') , | |
365 | 'description' => 'Contribution Page title. For top of page display', | |
366 | 'maxlength' => 255, | |
367 | 'size' => CRM_Utils_Type::HUGE, | |
368 | ) , | |
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.', | |
374 | 'rows' => 6, | |
375 | 'cols' => 50, | |
376 | 'html' => array( | |
377 | 'type' => 'RichTextEditor', | |
378 | ) , | |
379 | ) , | |
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', | |
386 | 'html' => array( | |
387 | 'type' => 'Select', | |
388 | ) , | |
389 | 'pseudoconstant' => array( | |
390 | 'table' => 'civicrm_financial_type', | |
391 | 'keyColumn' => 'id', | |
392 | 'labelColumn' => 'name', | |
393 | ) | |
394 | ) , | |
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', | |
400 | 'maxlength' => 128, | |
401 | 'size' => CRM_Utils_Type::HUGE, | |
402 | 'html' => array( | |
403 | 'type' => 'Select', | |
404 | ) , | |
405 | 'pseudoconstant' => array( | |
406 | 'table' => 'civicrm_payment_processor', | |
407 | 'keyColumn' => 'id', | |
408 | 'labelColumn' => 'name', | |
409 | ) | |
410 | ) , | |
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', | |
416 | ) , | |
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', | |
422 | 'default' => '1', | |
423 | ) , | |
424 | 'is_recur' => array( | |
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', | |
429 | ) , | |
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', | |
435 | 'default' => '1', | |
436 | ) , | |
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.', | |
442 | 'maxlength' => 128, | |
443 | 'size' => CRM_Utils_Type::HUGE, | |
444 | ) , | |
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', | |
450 | ) , | |
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', | |
456 | ) , | |
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', | |
462 | ) , | |
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', | |
468 | ) , | |
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', | |
474 | ) , | |
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', | |
480 | ) , | |
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', | |
486 | ) , | |
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', | |
492 | 'maxlength' => 255, | |
493 | 'size' => CRM_Utils_Type::HUGE, | |
494 | ) , | |
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', | |
500 | ) , | |
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( | |
507 | 20, | |
508 | 2 | |
509 | ) , | |
510 | ) , | |
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', | |
516 | ) , | |
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.', | |
522 | ) , | |
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( | |
529 | 20, | |
530 | 2 | |
531 | ) , | |
532 | ) , | |
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( | |
539 | 20, | |
540 | 2 | |
541 | ) , | |
542 | ) , | |
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( | |
549 | 20, | |
550 | 2 | |
551 | ) , | |
552 | ) , | |
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).', | |
558 | 'maxlength' => 255, | |
559 | 'size' => CRM_Utils_Type::HUGE, | |
560 | ) , | |
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', | |
566 | 'rows' => 8, | |
567 | 'cols' => 60, | |
568 | 'html' => array( | |
569 | 'type' => 'RichTextEditor', | |
570 | ) , | |
571 | ) , | |
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.', | |
577 | 'rows' => 8, | |
578 | 'cols' => 60, | |
579 | 'html' => array( | |
580 | 'type' => 'RichTextEditor', | |
581 | ) , | |
582 | ) , | |
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', | |
588 | ) , | |
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.', | |
594 | 'maxlength' => 255, | |
595 | 'size' => CRM_Utils_Type::HUGE, | |
596 | ) , | |
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.', | |
602 | 'maxlength' => 255, | |
603 | 'size' => CRM_Utils_Type::HUGE, | |
604 | ) , | |
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', | |
610 | 'maxlength' => 255, | |
611 | 'size' => CRM_Utils_Type::HUGE, | |
612 | ) , | |
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', | |
618 | 'maxlength' => 255, | |
619 | 'size' => CRM_Utils_Type::HUGE, | |
620 | ) , | |
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', | |
626 | 'rows' => 6, | |
627 | 'cols' => 50, | |
628 | 'html' => array( | |
629 | 'type' => 'TextArea', | |
630 | ) , | |
631 | ) , | |
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?', | |
637 | ) , | |
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.', | |
643 | 'rows' => 6, | |
644 | 'cols' => 50, | |
645 | 'html' => array( | |
646 | 'type' => 'RichTextEditor', | |
647 | ) , | |
648 | ) , | |
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?', | |
654 | 'default' => '1', | |
655 | ) , | |
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.', | |
661 | ) , | |
662 | 'end_date' => array( | |
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', | |
667 | ) , | |
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', | |
674 | ) , | |
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.', | |
680 | ) , | |
681 | 'currency' => array( | |
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.', | |
686 | 'maxlength' => 3, | |
687 | 'size' => CRM_Utils_Type::FOUR, | |
688 | 'default' => 'NULL', | |
689 | 'html' => array( | |
690 | 'type' => 'Select', | |
691 | ) , | |
692 | 'pseudoconstant' => array( | |
693 | 'table' => 'civicrm_currency', | |
694 | 'keyColumn' => 'name', | |
695 | 'labelColumn' => 'full_name', | |
696 | 'nameColumn' => 'name', | |
697 | ) | |
698 | ) , | |
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', | |
707 | 'keyColumn' => 'id', | |
708 | 'labelColumn' => 'title', | |
709 | ) | |
710 | ) , | |
711 | 'is_share' => array( | |
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?', | |
716 | 'default' => '1', | |
717 | ) , | |
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', | |
723 | ) , | |
724 | ); | |
346aaaba | 725 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 726 | } |
346aaaba | 727 | return Civi::$statics[__CLASS__]['fields']; |
e501603b TO |
728 | } |
729 | /** | |
bd8e0b14 | 730 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
731 | * |
732 | * @return array | |
bd8e0b14 | 733 | * Array(string $name => string $uniqueName). |
e501603b TO |
734 | */ |
735 | static function &fieldKeys() { | |
bd8e0b14 TO |
736 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
737 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 738 | } |
bd8e0b14 | 739 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b TO |
740 | } |
741 | /** | |
742 | * Returns the names of this table | |
743 | * | |
744 | * @return string | |
745 | */ | |
746 | static function getTableName() { | |
747 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); | |
748 | } | |
749 | /** | |
750 | * Returns if this table needs to be logged | |
751 | * | |
752 | * @return boolean | |
753 | */ | |
754 | function getLog() { | |
755 | return self::$_log; | |
756 | } | |
757 | /** | |
758 | * Returns the list of fields that can be imported | |
759 | * | |
760 | * @param bool $prefix | |
761 | * | |
762 | * @return array | |
763 | */ | |
764 | static function &import($prefix = false) { | |
60808919 TO |
765 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_page', $prefix, array()); |
766 | return $r; | |
e501603b TO |
767 | } |
768 | /** | |
769 | * Returns the list of fields that can be exported | |
770 | * | |
771 | * @param bool $prefix | |
772 | * | |
773 | * @return array | |
774 | */ | |
775 | static function &export($prefix = false) { | |
60808919 TO |
776 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_page', $prefix, array()); |
777 | return $r; | |
e501603b TO |
778 | } |
779 | } |