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