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