Commit | Line | Data |
---|---|---|
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 | |
f29bf4f3 | 9 | * (GenCodeChecksum:382259aca3342191a285c0984cab168b) |
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 | */ | |
fa45b5b9 | 22 | public 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 | */ |
fa45b5b9 | 29 | public static $_log = TRUE; |
c3fc2621 | 30 | |
e501603b TO |
31 | /** |
32 | * Contribution Id | |
33 | * | |
e6ca0a57 | 34 | * @var int |
e501603b TO |
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 | * | |
e6ca0a57 | 55 | * @var int |
e501603b TO |
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 | * | |
e6ca0a57 | 69 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 76 | * @var bool |
e501603b TO |
77 | */ |
78 | public $is_monetary; | |
c3fc2621 | 79 | |
e501603b TO |
80 | /** |
81 | * if true - allows recurring contributions, valid only for PayPal_Standard | |
82 | * | |
e6ca0a57 | 83 | * @var bool |
e501603b TO |
84 | */ |
85 | public $is_recur; | |
c3fc2621 | 86 | |
e501603b TO |
87 | /** |
88 | * if false, the confirm page in contribution pages gets skipped | |
89 | * | |
e6ca0a57 | 90 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 104 | * @var bool |
e501603b TO |
105 | */ |
106 | public $is_recur_interval; | |
c3fc2621 | 107 | |
e501603b TO |
108 | /** |
109 | * if true - asks user for recurring installments | |
110 | * | |
e6ca0a57 | 111 | * @var bool |
e501603b TO |
112 | */ |
113 | public $is_recur_installments; | |
c3fc2621 | 114 | |
e501603b TO |
115 | /** |
116 | * if true - user is able to adjust payment start date | |
117 | * | |
e6ca0a57 | 118 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 125 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 146 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 174 | * @var bool |
e501603b TO |
175 | */ |
176 | public $is_allow_other_amount; | |
c3fc2621 | 177 | |
e501603b TO |
178 | /** |
179 | * FK to civicrm_option_value. | |
180 | * | |
e6ca0a57 | 181 | * @var int |
e501603b TO |
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 | * | |
e6ca0a57 | 230 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 272 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 286 | * @var bool |
e501603b TO |
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 | * | |
e6ca0a57 | 307 | * @var int |
e501603b TO |
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 | * | |
e6ca0a57 | 328 | * @var int |
e501603b TO |
329 | */ |
330 | public $campaign_id; | |
c3fc2621 | 331 | |
e501603b TO |
332 | /** |
333 | * Can people share the contribution page through social media? | |
334 | * | |
e6ca0a57 | 335 | * @var bool |
e501603b TO |
336 | */ |
337 | public $is_share; | |
c3fc2621 | 338 | |
e501603b TO |
339 | /** |
340 | * if true - billing block is required for online contribution page | |
341 | * | |
e6ca0a57 | 342 | * @var bool |
e501603b TO |
343 | */ |
344 | public $is_billing_required; | |
c3fc2621 | 345 | |
6489e3de SL |
346 | /** |
347 | * Contribution Page Public title | |
348 | * | |
349 | * @var string | |
350 | */ | |
351 | public $frontend_title; | |
352 | ||
e501603b | 353 | /** |
f41f0342 | 354 | * Class constructor. |
e501603b | 355 | */ |
c3fc2621 | 356 | public function __construct() { |
e501603b TO |
357 | $this->__table = 'civicrm_contribution_page'; |
358 | parent::__construct(); | |
359 | } | |
c3fc2621 | 360 | |
e501603b | 361 | /** |
f41f0342 | 362 | * Returns foreign keys and entity references. |
e501603b TO |
363 | * |
364 | * @return array | |
365 | * [CRM_Core_Reference_Interface] | |
366 | */ | |
c3fc2621 | 367 | public static function getReferenceColumns() { |
346aaaba | 368 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
fa45b5b9 | 369 | Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); |
c3fc2621 CW |
370 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id'); |
371 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id'); | |
372 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id'); | |
346aaaba | 373 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); |
e501603b | 374 | } |
346aaaba | 375 | return Civi::$statics[__CLASS__]['links']; |
e501603b | 376 | } |
c3fc2621 | 377 | |
e501603b TO |
378 | /** |
379 | * Returns all the column names of this table | |
380 | * | |
381 | * @return array | |
382 | */ | |
c3fc2621 | 383 | public static function &fields() { |
346aaaba | 384 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
385 | Civi::$statics[__CLASS__]['fields'] = [ |
386 | 'id' => [ | |
e501603b TO |
387 | 'name' => 'id', |
388 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 389 | 'title' => ts('Contribution Page ID'), |
215b423e | 390 | 'description' => ts('Contribution Id'), |
c3fc2621 | 391 | 'required' => TRUE, |
a36434b9 | 392 | 'where' => 'civicrm_contribution_page.id', |
522a26c9 | 393 | 'table_name' => 'civicrm_contribution_page', |
394 | 'entity' => 'ContributionPage', | |
395 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 396 | 'localizable' => 0, |
c3fc2621 CW |
397 | ], |
398 | 'title' => [ | |
e501603b TO |
399 | 'name' => 'title', |
400 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 401 | 'title' => ts('Contribution Page Title'), |
215b423e | 402 | 'description' => ts('Contribution Page title. For top of page display'), |
e501603b TO |
403 | 'maxlength' => 255, |
404 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 405 | 'where' => 'civicrm_contribution_page.title', |
522a26c9 | 406 | 'table_name' => 'civicrm_contribution_page', |
407 | 'entity' => 'ContributionPage', | |
408 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 409 | 'localizable' => 1, |
c3fc2621 CW |
410 | ], |
411 | 'intro_text' => [ | |
e501603b TO |
412 | 'name' => 'intro_text', |
413 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 414 | 'title' => ts('Contribution Page Introduction Text'), |
215b423e | 415 | 'description' => ts('Text and html allowed. Displayed below title.'), |
e501603b TO |
416 | 'rows' => 6, |
417 | 'cols' => 50, | |
a36434b9 | 418 | 'where' => 'civicrm_contribution_page.intro_text', |
522a26c9 | 419 | 'table_name' => 'civicrm_contribution_page', |
420 | 'entity' => 'ContributionPage', | |
421 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 422 | 'localizable' => 1, |
c3fc2621 | 423 | 'html' => [ |
e501603b | 424 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
425 | ], |
426 | ], | |
427 | 'financial_type_id' => [ | |
e501603b TO |
428 | 'name' => 'financial_type_id', |
429 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 430 | 'title' => ts('Financial Type'), |
215b423e | 431 | 'description' => ts('default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution'), |
a36434b9 | 432 | 'where' => 'civicrm_contribution_page.financial_type_id', |
522a26c9 | 433 | 'table_name' => 'civicrm_contribution_page', |
434 | 'entity' => 'ContributionPage', | |
435 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 436 | 'localizable' => 0, |
e501603b | 437 | 'FKClassName' => 'CRM_Financial_DAO_FinancialType', |
c3fc2621 | 438 | 'html' => [ |
e501603b | 439 | 'type' => 'Select', |
c3fc2621 CW |
440 | ], |
441 | 'pseudoconstant' => [ | |
e501603b TO |
442 | 'table' => 'civicrm_financial_type', |
443 | 'keyColumn' => 'id', | |
444 | 'labelColumn' => 'name', | |
e6ca0a57 | 445 | ], |
c3fc2621 CW |
446 | ], |
447 | 'payment_processor' => [ | |
e501603b TO |
448 | 'name' => 'payment_processor', |
449 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 450 | 'title' => ts('Payment Processor'), |
215b423e | 451 | 'description' => ts('Payment Processors configured for this contribution Page'), |
e501603b TO |
452 | 'maxlength' => 128, |
453 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 454 | 'where' => 'civicrm_contribution_page.payment_processor', |
522a26c9 | 455 | 'table_name' => 'civicrm_contribution_page', |
456 | 'entity' => 'ContributionPage', | |
457 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 458 | 'localizable' => 0, |
c3fc2621 | 459 | 'html' => [ |
e501603b | 460 | 'type' => 'Select', |
c3fc2621 CW |
461 | ], |
462 | 'pseudoconstant' => [ | |
e501603b TO |
463 | 'table' => 'civicrm_payment_processor', |
464 | 'keyColumn' => 'id', | |
465 | 'labelColumn' => 'name', | |
e6ca0a57 | 466 | ], |
c3fc2621 CW |
467 | ], |
468 | 'is_credit_card_only' => [ | |
e501603b TO |
469 | 'name' => 'is_credit_card_only', |
470 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 471 | 'title' => ts('Is Credit Card Only?'), |
215b423e | 472 | 'description' => ts('if true - processing logic must reject transaction at confirmation stage if pay method != credit card'), |
a36434b9 | 473 | 'where' => 'civicrm_contribution_page.is_credit_card_only', |
45a83e42 | 474 | 'default' => '0', |
522a26c9 | 475 | 'table_name' => 'civicrm_contribution_page', |
476 | 'entity' => 'ContributionPage', | |
477 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 478 | 'localizable' => 0, |
c3fc2621 CW |
479 | ], |
480 | 'is_monetary' => [ | |
e501603b TO |
481 | 'name' => 'is_monetary', |
482 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 483 | 'title' => ts('Is Monetary'), |
215b423e | 484 | 'description' => ts('if true - allows real-time monetary transactions otherwise non-monetary transactions'), |
a36434b9 | 485 | 'where' => 'civicrm_contribution_page.is_monetary', |
e501603b | 486 | 'default' => '1', |
522a26c9 | 487 | 'table_name' => 'civicrm_contribution_page', |
488 | 'entity' => 'ContributionPage', | |
489 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 490 | 'localizable' => 0, |
c3fc2621 CW |
491 | ], |
492 | 'is_recur' => [ | |
e501603b TO |
493 | 'name' => 'is_recur', |
494 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 495 | 'title' => ts('Is Recurring'), |
215b423e | 496 | 'description' => ts('if true - allows recurring contributions, valid only for PayPal_Standard'), |
a36434b9 | 497 | 'where' => 'civicrm_contribution_page.is_recur', |
45a83e42 | 498 | 'default' => '0', |
522a26c9 | 499 | 'table_name' => 'civicrm_contribution_page', |
500 | 'entity' => 'ContributionPage', | |
501 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 502 | 'localizable' => 0, |
c3fc2621 CW |
503 | ], |
504 | 'is_confirm_enabled' => [ | |
e501603b TO |
505 | 'name' => 'is_confirm_enabled', |
506 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 507 | 'title' => ts('Confirmation Page?'), |
215b423e | 508 | 'description' => ts('if false, the confirm page in contribution pages gets skipped'), |
a36434b9 | 509 | 'where' => 'civicrm_contribution_page.is_confirm_enabled', |
e501603b | 510 | 'default' => '1', |
522a26c9 | 511 | 'table_name' => 'civicrm_contribution_page', |
512 | 'entity' => 'ContributionPage', | |
513 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 514 | 'localizable' => 0, |
c3fc2621 CW |
515 | ], |
516 | 'recur_frequency_unit' => [ | |
e501603b TO |
517 | 'name' => 'recur_frequency_unit', |
518 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 519 | 'title' => ts('Recurring Frequency'), |
215b423e | 520 | 'description' => ts('Supported recurring frequency units.'), |
e501603b TO |
521 | 'maxlength' => 128, |
522 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 523 | 'where' => 'civicrm_contribution_page.recur_frequency_unit', |
522a26c9 | 524 | 'table_name' => 'civicrm_contribution_page', |
525 | 'entity' => 'ContributionPage', | |
526 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 527 | 'localizable' => 0, |
2a5c9b4d | 528 | 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED, |
c3fc2621 | 529 | 'html' => [ |
2a5c9b4d | 530 | 'type' => 'Select', |
c3fc2621 CW |
531 | ], |
532 | 'pseudoconstant' => [ | |
2a5c9b4d CW |
533 | 'optionGroupName' => 'recur_frequency_units', |
534 | 'keyColumn' => 'name', | |
535 | 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units', | |
e6ca0a57 | 536 | ], |
c3fc2621 CW |
537 | ], |
538 | 'is_recur_interval' => [ | |
e501603b TO |
539 | 'name' => 'is_recur_interval', |
540 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 541 | 'title' => ts('Support Recurring Intervals'), |
215b423e | 542 | 'description' => ts('if true - supports recurring intervals'), |
a36434b9 | 543 | 'where' => 'civicrm_contribution_page.is_recur_interval', |
45a83e42 | 544 | 'default' => '0', |
522a26c9 | 545 | 'table_name' => 'civicrm_contribution_page', |
546 | 'entity' => 'ContributionPage', | |
547 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 548 | 'localizable' => 0, |
c3fc2621 CW |
549 | ], |
550 | 'is_recur_installments' => [ | |
e501603b TO |
551 | 'name' => 'is_recur_installments', |
552 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 553 | 'title' => ts('Recurring Installments?'), |
215b423e | 554 | 'description' => ts('if true - asks user for recurring installments'), |
a36434b9 | 555 | 'where' => 'civicrm_contribution_page.is_recur_installments', |
45a83e42 | 556 | 'default' => '0', |
522a26c9 | 557 | 'table_name' => 'civicrm_contribution_page', |
558 | 'entity' => 'ContributionPage', | |
559 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 560 | 'localizable' => 0, |
c3fc2621 CW |
561 | ], |
562 | 'adjust_recur_start_date' => [ | |
e501603b TO |
563 | 'name' => 'adjust_recur_start_date', |
564 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 565 | 'title' => ts('Adjust Recurring Start Date'), |
215b423e | 566 | 'description' => ts('if true - user is able to adjust payment start date'), |
a36434b9 | 567 | 'where' => 'civicrm_contribution_page.adjust_recur_start_date', |
45a83e42 | 568 | 'default' => '0', |
522a26c9 | 569 | 'table_name' => 'civicrm_contribution_page', |
570 | 'entity' => 'ContributionPage', | |
571 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 572 | 'localizable' => 0, |
c3fc2621 CW |
573 | ], |
574 | 'is_pay_later' => [ | |
e501603b TO |
575 | 'name' => 'is_pay_later', |
576 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 577 | 'title' => ts('Pay Later'), |
215b423e | 578 | 'description' => ts('if true - allows the user to send payment directly to the org later'), |
a36434b9 | 579 | 'where' => 'civicrm_contribution_page.is_pay_later', |
45a83e42 | 580 | 'default' => '0', |
522a26c9 | 581 | 'table_name' => 'civicrm_contribution_page', |
582 | 'entity' => 'ContributionPage', | |
583 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 584 | 'localizable' => 0, |
c3fc2621 CW |
585 | ], |
586 | 'pay_later_text' => [ | |
e501603b TO |
587 | 'name' => 'pay_later_text', |
588 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 589 | 'title' => ts('Pay Later Text'), |
215b423e | 590 | 'description' => ts('The text displayed to the user in the main form'), |
a36434b9 | 591 | 'where' => 'civicrm_contribution_page.pay_later_text', |
522a26c9 | 592 | 'table_name' => 'civicrm_contribution_page', |
593 | 'entity' => 'ContributionPage', | |
594 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 595 | 'localizable' => 1, |
c3fc2621 CW |
596 | ], |
597 | 'pay_later_receipt' => [ | |
e501603b TO |
598 | 'name' => 'pay_later_receipt', |
599 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 600 | 'title' => ts('Pay Later Receipt'), |
215b423e | 601 | 'description' => ts('The receipt sent to the user instead of the normal receipt text'), |
a36434b9 | 602 | 'where' => 'civicrm_contribution_page.pay_later_receipt', |
522a26c9 | 603 | 'table_name' => 'civicrm_contribution_page', |
604 | 'entity' => 'ContributionPage', | |
605 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 606 | 'localizable' => 1, |
c3fc2621 CW |
607 | ], |
608 | 'is_partial_payment' => [ | |
e501603b TO |
609 | 'name' => 'is_partial_payment', |
610 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 611 | 'title' => ts('Allow Partial Payment'), |
215b423e | 612 | 'description' => ts('is partial payment enabled for this online contribution page'), |
a36434b9 | 613 | 'where' => 'civicrm_contribution_page.is_partial_payment', |
45a83e42 | 614 | 'default' => '0', |
522a26c9 | 615 | 'table_name' => 'civicrm_contribution_page', |
616 | 'entity' => 'ContributionPage', | |
617 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 618 | 'localizable' => 0, |
c3fc2621 CW |
619 | ], |
620 | 'initial_amount_label' => [ | |
e501603b TO |
621 | 'name' => 'initial_amount_label', |
622 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 623 | 'title' => ts('Initial Amount Label'), |
215b423e | 624 | 'description' => ts('Initial amount label for partial payment'), |
e501603b TO |
625 | 'maxlength' => 255, |
626 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 627 | 'where' => 'civicrm_contribution_page.initial_amount_label', |
522a26c9 | 628 | 'table_name' => 'civicrm_contribution_page', |
629 | 'entity' => 'ContributionPage', | |
630 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 631 | 'localizable' => 1, |
c3fc2621 CW |
632 | ], |
633 | 'initial_amount_help_text' => [ | |
e501603b TO |
634 | 'name' => 'initial_amount_help_text', |
635 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 636 | 'title' => ts('Initial Amount Help Text'), |
215b423e | 637 | 'description' => ts('Initial amount help text for partial payment'), |
a36434b9 | 638 | 'where' => 'civicrm_contribution_page.initial_amount_help_text', |
522a26c9 | 639 | 'table_name' => 'civicrm_contribution_page', |
640 | 'entity' => 'ContributionPage', | |
641 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 642 | 'localizable' => 1, |
c3fc2621 CW |
643 | ], |
644 | 'min_initial_amount' => [ | |
e501603b TO |
645 | 'name' => 'min_initial_amount', |
646 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 647 | 'title' => ts('Min Initial Amount'), |
215b423e | 648 | 'description' => ts('Minimum initial amount for partial payment'), |
c3fc2621 | 649 | 'precision' => [ |
e501603b | 650 | 20, |
fb607354 | 651 | 2, |
c3fc2621 | 652 | ], |
a36434b9 | 653 | 'where' => 'civicrm_contribution_page.min_initial_amount', |
522a26c9 | 654 | 'table_name' => 'civicrm_contribution_page', |
655 | 'entity' => 'ContributionPage', | |
656 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 657 | 'localizable' => 0, |
c3fc2621 CW |
658 | ], |
659 | 'is_allow_other_amount' => [ | |
e501603b TO |
660 | 'name' => 'is_allow_other_amount', |
661 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 662 | 'title' => ts('Allow Other Amounts'), |
215b423e | 663 | 'description' => ts('if true, page will include an input text field where user can enter their own amount'), |
a36434b9 | 664 | 'where' => 'civicrm_contribution_page.is_allow_other_amount', |
45a83e42 | 665 | 'default' => '0', |
522a26c9 | 666 | 'table_name' => 'civicrm_contribution_page', |
667 | 'entity' => 'ContributionPage', | |
668 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 669 | 'localizable' => 0, |
c3fc2621 CW |
670 | ], |
671 | 'default_amount_id' => [ | |
e501603b TO |
672 | 'name' => 'default_amount_id', |
673 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 674 | 'title' => ts('Default Amount'), |
215b423e | 675 | 'description' => ts('FK to civicrm_option_value.'), |
a36434b9 | 676 | 'where' => 'civicrm_contribution_page.default_amount_id', |
522a26c9 | 677 | 'table_name' => 'civicrm_contribution_page', |
678 | 'entity' => 'ContributionPage', | |
679 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 680 | 'localizable' => 0, |
c3fc2621 CW |
681 | ], |
682 | 'min_amount' => [ | |
e501603b TO |
683 | 'name' => 'min_amount', |
684 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 685 | 'title' => ts('Minimum Amount'), |
215b423e | 686 | 'description' => ts('if other amounts allowed, user can configure minimum allowed.'), |
c3fc2621 | 687 | 'precision' => [ |
e501603b | 688 | 20, |
fb607354 | 689 | 2, |
c3fc2621 | 690 | ], |
a36434b9 | 691 | 'where' => 'civicrm_contribution_page.min_amount', |
522a26c9 | 692 | 'table_name' => 'civicrm_contribution_page', |
693 | 'entity' => 'ContributionPage', | |
694 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 695 | 'localizable' => 0, |
c3fc2621 CW |
696 | ], |
697 | 'max_amount' => [ | |
e501603b TO |
698 | 'name' => 'max_amount', |
699 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 700 | 'title' => ts('Maximum Amount'), |
215b423e | 701 | 'description' => ts('if other amounts allowed, user can configure maximum allowed.'), |
c3fc2621 | 702 | 'precision' => [ |
e501603b | 703 | 20, |
fb607354 | 704 | 2, |
c3fc2621 | 705 | ], |
a36434b9 | 706 | 'where' => 'civicrm_contribution_page.max_amount', |
522a26c9 | 707 | 'table_name' => 'civicrm_contribution_page', |
708 | 'entity' => 'ContributionPage', | |
709 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 710 | 'localizable' => 0, |
c3fc2621 CW |
711 | ], |
712 | 'goal_amount' => [ | |
e501603b TO |
713 | 'name' => 'goal_amount', |
714 | 'type' => CRM_Utils_Type::T_MONEY, | |
c3fc2621 | 715 | 'title' => ts('Goal Amount'), |
215b423e | 716 | 'description' => ts('The target goal for this page, allows people to build a goal meter'), |
c3fc2621 | 717 | 'precision' => [ |
e501603b | 718 | 20, |
fb607354 | 719 | 2, |
c3fc2621 | 720 | ], |
a36434b9 | 721 | 'where' => 'civicrm_contribution_page.goal_amount', |
522a26c9 | 722 | 'table_name' => 'civicrm_contribution_page', |
723 | 'entity' => 'ContributionPage', | |
724 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 725 | 'localizable' => 0, |
c3fc2621 CW |
726 | ], |
727 | 'thankyou_title' => [ | |
e501603b TO |
728 | 'name' => 'thankyou_title', |
729 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 730 | 'title' => ts('Thank-you Title'), |
215b423e | 731 | 'description' => ts('Title for Thank-you page (header title tag, and display at the top of the page).'), |
e501603b TO |
732 | 'maxlength' => 255, |
733 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 734 | 'where' => 'civicrm_contribution_page.thankyou_title', |
522a26c9 | 735 | 'table_name' => 'civicrm_contribution_page', |
736 | 'entity' => 'ContributionPage', | |
737 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 738 | 'localizable' => 1, |
c3fc2621 CW |
739 | ], |
740 | 'thankyou_text' => [ | |
e501603b TO |
741 | 'name' => 'thankyou_text', |
742 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 743 | 'title' => ts('Thank-you Text'), |
215b423e | 744 | 'description' => ts('text and html allowed. displayed above result on success page'), |
e501603b TO |
745 | 'rows' => 8, |
746 | 'cols' => 60, | |
a36434b9 | 747 | 'where' => 'civicrm_contribution_page.thankyou_text', |
522a26c9 | 748 | 'table_name' => 'civicrm_contribution_page', |
749 | 'entity' => 'ContributionPage', | |
750 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 751 | 'localizable' => 1, |
c3fc2621 | 752 | 'html' => [ |
e501603b | 753 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
754 | ], |
755 | ], | |
756 | 'thankyou_footer' => [ | |
e501603b TO |
757 | 'name' => 'thankyou_footer', |
758 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 759 | 'title' => ts('Thank-you Footer'), |
215b423e | 760 | '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 |
761 | 'rows' => 8, |
762 | 'cols' => 60, | |
a36434b9 | 763 | 'where' => 'civicrm_contribution_page.thankyou_footer', |
522a26c9 | 764 | 'table_name' => 'civicrm_contribution_page', |
765 | 'entity' => 'ContributionPage', | |
766 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 767 | 'localizable' => 1, |
c3fc2621 | 768 | 'html' => [ |
e501603b | 769 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
770 | ], |
771 | ], | |
772 | 'is_email_receipt' => [ | |
e501603b TO |
773 | 'name' => 'is_email_receipt', |
774 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 775 | 'title' => ts('Send email Receipt'), |
215b423e | 776 | 'description' => ts('if true, receipt is automatically emailed to contact on success'), |
a36434b9 | 777 | 'where' => 'civicrm_contribution_page.is_email_receipt', |
45a83e42 | 778 | 'default' => '0', |
522a26c9 | 779 | 'table_name' => 'civicrm_contribution_page', |
780 | 'entity' => 'ContributionPage', | |
781 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 782 | 'localizable' => 0, |
c3fc2621 CW |
783 | ], |
784 | 'receipt_from_name' => [ | |
e501603b TO |
785 | 'name' => 'receipt_from_name', |
786 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 787 | 'title' => ts('Receipt From'), |
215b423e | 788 | 'description' => ts('FROM email name used for receipts generated by contributions to this contribution page.'), |
e501603b TO |
789 | 'maxlength' => 255, |
790 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 791 | 'where' => 'civicrm_contribution_page.receipt_from_name', |
522a26c9 | 792 | 'table_name' => 'civicrm_contribution_page', |
793 | 'entity' => 'ContributionPage', | |
794 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 795 | 'localizable' => 1, |
c3fc2621 CW |
796 | ], |
797 | 'receipt_from_email' => [ | |
e501603b TO |
798 | 'name' => 'receipt_from_email', |
799 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 800 | 'title' => ts('Receipt From email'), |
215b423e | 801 | 'description' => ts('FROM email address used for receipts generated by contributions to this contribution page.'), |
e501603b TO |
802 | 'maxlength' => 255, |
803 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 804 | 'where' => 'civicrm_contribution_page.receipt_from_email', |
522a26c9 | 805 | 'table_name' => 'civicrm_contribution_page', |
806 | 'entity' => 'ContributionPage', | |
807 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 808 | 'localizable' => 0, |
c3fc2621 CW |
809 | ], |
810 | 'cc_receipt' => [ | |
e501603b TO |
811 | 'name' => 'cc_receipt', |
812 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 813 | 'title' => ts('Receipt cc'), |
215b423e | 814 | 'description' => ts('comma-separated list of email addresses to cc each time a receipt is sent'), |
e501603b TO |
815 | 'maxlength' => 255, |
816 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 817 | 'where' => 'civicrm_contribution_page.cc_receipt', |
522a26c9 | 818 | 'table_name' => 'civicrm_contribution_page', |
819 | 'entity' => 'ContributionPage', | |
820 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 821 | 'localizable' => 0, |
c3fc2621 CW |
822 | ], |
823 | 'bcc_receipt' => [ | |
e501603b TO |
824 | 'name' => 'bcc_receipt', |
825 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 826 | 'title' => ts('Receipt bcc'), |
215b423e | 827 | 'description' => ts('comma-separated list of email addresses to bcc each time a receipt is sent'), |
e501603b TO |
828 | 'maxlength' => 255, |
829 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 830 | 'where' => 'civicrm_contribution_page.bcc_receipt', |
522a26c9 | 831 | 'table_name' => 'civicrm_contribution_page', |
832 | 'entity' => 'ContributionPage', | |
833 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 834 | 'localizable' => 0, |
c3fc2621 CW |
835 | ], |
836 | 'receipt_text' => [ | |
e501603b TO |
837 | 'name' => 'receipt_text', |
838 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 839 | 'title' => ts('Receipt Text'), |
215b423e | 840 | '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 |
841 | 'rows' => 6, |
842 | 'cols' => 50, | |
a36434b9 | 843 | 'where' => 'civicrm_contribution_page.receipt_text', |
522a26c9 | 844 | 'table_name' => 'civicrm_contribution_page', |
845 | 'entity' => 'ContributionPage', | |
846 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 847 | 'localizable' => 1, |
c3fc2621 | 848 | 'html' => [ |
e501603b | 849 | 'type' => 'TextArea', |
c3fc2621 CW |
850 | ], |
851 | ], | |
852 | 'is_active' => [ | |
e501603b TO |
853 | 'name' => 'is_active', |
854 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 855 | 'title' => ts('Is Page Active?'), |
215b423e | 856 | 'description' => ts('Is this property active?'), |
a36434b9 | 857 | 'where' => 'civicrm_contribution_page.is_active', |
522a26c9 | 858 | 'table_name' => 'civicrm_contribution_page', |
859 | 'entity' => 'ContributionPage', | |
860 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 861 | 'localizable' => 0, |
c3fc2621 CW |
862 | ], |
863 | 'footer_text' => [ | |
e501603b TO |
864 | 'name' => 'footer_text', |
865 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 866 | 'title' => ts('Footer Text'), |
215b423e | 867 | 'description' => ts('Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.'), |
e501603b TO |
868 | 'rows' => 6, |
869 | 'cols' => 50, | |
a36434b9 | 870 | 'where' => 'civicrm_contribution_page.footer_text', |
522a26c9 | 871 | 'table_name' => 'civicrm_contribution_page', |
872 | 'entity' => 'ContributionPage', | |
873 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 874 | 'localizable' => 1, |
c3fc2621 | 875 | 'html' => [ |
e501603b | 876 | 'type' => 'RichTextEditor', |
c3fc2621 CW |
877 | ], |
878 | ], | |
879 | 'amount_block_is_active' => [ | |
e501603b TO |
880 | 'name' => 'amount_block_is_active', |
881 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 882 | 'title' => ts('Is Amount Block Active?'), |
215b423e | 883 | 'description' => ts('Is this property active?'), |
a36434b9 | 884 | 'where' => 'civicrm_contribution_page.amount_block_is_active', |
e501603b | 885 | 'default' => '1', |
522a26c9 | 886 | 'table_name' => 'civicrm_contribution_page', |
887 | 'entity' => 'ContributionPage', | |
888 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 889 | 'localizable' => 0, |
c3fc2621 CW |
890 | ], |
891 | 'start_date' => [ | |
e501603b TO |
892 | 'name' => 'start_date', |
893 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 894 | 'title' => ts('Contribution Page Start Date'), |
215b423e | 895 | 'description' => ts('Date and time that this page starts.'), |
a36434b9 | 896 | 'where' => 'civicrm_contribution_page.start_date', |
522a26c9 | 897 | 'table_name' => 'civicrm_contribution_page', |
898 | 'entity' => 'ContributionPage', | |
899 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 900 | 'localizable' => 0, |
c3fc2621 CW |
901 | ], |
902 | 'end_date' => [ | |
e501603b TO |
903 | 'name' => 'end_date', |
904 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 905 | 'title' => ts('Contribution Page End Date'), |
215b423e | 906 | 'description' => ts('Date and time that this page ends. May be NULL if no defined end date/time'), |
a36434b9 | 907 | 'where' => 'civicrm_contribution_page.end_date', |
522a26c9 | 908 | 'table_name' => 'civicrm_contribution_page', |
909 | 'entity' => 'ContributionPage', | |
910 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 911 | 'localizable' => 0, |
c3fc2621 CW |
912 | ], |
913 | 'created_id' => [ | |
e501603b TO |
914 | 'name' => 'created_id', |
915 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 916 | 'title' => ts('Contribution Page Created By'), |
215b423e | 917 | 'description' => ts('FK to civicrm_contact, who created this contribution page'), |
a36434b9 | 918 | 'where' => 'civicrm_contribution_page.created_id', |
522a26c9 | 919 | 'table_name' => 'civicrm_contribution_page', |
920 | 'entity' => 'ContributionPage', | |
921 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 922 | 'localizable' => 0, |
e501603b | 923 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
c3fc2621 CW |
924 | ], |
925 | 'created_date' => [ | |
e501603b TO |
926 | 'name' => 'created_date', |
927 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 928 | 'title' => ts('Contribution Page Created Date'), |
215b423e | 929 | 'description' => ts('Date and time that contribution page was created.'), |
a36434b9 | 930 | 'where' => 'civicrm_contribution_page.created_date', |
522a26c9 | 931 | 'table_name' => 'civicrm_contribution_page', |
932 | 'entity' => 'ContributionPage', | |
933 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 934 | 'localizable' => 0, |
c3fc2621 CW |
935 | ], |
936 | 'currency' => [ | |
e501603b TO |
937 | 'name' => 'currency', |
938 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 939 | 'title' => ts('Contribution Page Currency'), |
215b423e | 940 | 'description' => ts('3 character string, value from config setting or input via user.'), |
e501603b TO |
941 | 'maxlength' => 3, |
942 | 'size' => CRM_Utils_Type::FOUR, | |
a36434b9 | 943 | 'where' => 'civicrm_contribution_page.currency', |
944 | 'headerPattern' => '/cur(rency)?/i', | |
945 | 'dataPattern' => '/^[A-Z]{3}$/i', | |
e501603b | 946 | 'default' => 'NULL', |
522a26c9 | 947 | 'table_name' => 'civicrm_contribution_page', |
948 | 'entity' => 'ContributionPage', | |
949 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 950 | 'localizable' => 0, |
c3fc2621 | 951 | 'html' => [ |
e501603b | 952 | 'type' => 'Select', |
c3fc2621 CW |
953 | ], |
954 | 'pseudoconstant' => [ | |
e501603b TO |
955 | 'table' => 'civicrm_currency', |
956 | 'keyColumn' => 'name', | |
957 | 'labelColumn' => 'full_name', | |
958 | 'nameColumn' => 'name', | |
a8fdb24e | 959 | 'abbrColumn' => 'symbol', |
e6ca0a57 | 960 | ], |
c3fc2621 CW |
961 | ], |
962 | 'campaign_id' => [ | |
e501603b TO |
963 | 'name' => 'campaign_id', |
964 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 965 | 'title' => ts('Contribution Page Campaign ID'), |
215b423e | 966 | 'description' => ts('The campaign for which we are collecting contributions with this page.'), |
a36434b9 | 967 | 'where' => 'civicrm_contribution_page.campaign_id', |
522a26c9 | 968 | 'table_name' => 'civicrm_contribution_page', |
969 | 'entity' => 'ContributionPage', | |
970 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 971 | 'localizable' => 0, |
e501603b | 972 | 'FKClassName' => 'CRM_Campaign_DAO_Campaign', |
c3fc2621 | 973 | 'pseudoconstant' => [ |
e501603b TO |
974 | 'table' => 'civicrm_campaign', |
975 | 'keyColumn' => 'id', | |
976 | 'labelColumn' => 'title', | |
e6ca0a57 | 977 | ], |
c3fc2621 CW |
978 | ], |
979 | 'is_share' => [ | |
e501603b TO |
980 | 'name' => 'is_share', |
981 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 982 | 'title' => ts('Is Contribution Page Shared?'), |
215b423e | 983 | 'description' => ts('Can people share the contribution page through social media?'), |
a36434b9 | 984 | 'where' => 'civicrm_contribution_page.is_share', |
e501603b | 985 | 'default' => '1', |
522a26c9 | 986 | 'table_name' => 'civicrm_contribution_page', |
987 | 'entity' => 'ContributionPage', | |
988 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 989 | 'localizable' => 0, |
c3fc2621 CW |
990 | ], |
991 | 'is_billing_required' => [ | |
e501603b TO |
992 | 'name' => 'is_billing_required', |
993 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 994 | 'title' => ts('Is billing block required'), |
215b423e | 995 | 'description' => ts('if true - billing block is required for online contribution page'), |
a36434b9 | 996 | 'where' => 'civicrm_contribution_page.is_billing_required', |
45a83e42 | 997 | 'default' => '0', |
522a26c9 | 998 | 'table_name' => 'civicrm_contribution_page', |
999 | 'entity' => 'ContributionPage', | |
1000 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
6a7e5e5d | 1001 | 'localizable' => 0, |
c3fc2621 | 1002 | ], |
6489e3de SL |
1003 | 'contribution_page_frontend_title' => [ |
1004 | 'name' => 'frontend_title', | |
1005 | 'type' => CRM_Utils_Type::T_STRING, | |
1006 | 'title' => ts('Public Title'), | |
1007 | 'description' => ts('Contribution Page Public title'), | |
1008 | 'maxlength' => 255, | |
1009 | 'size' => CRM_Utils_Type::HUGE, | |
1010 | 'where' => 'civicrm_contribution_page.frontend_title', | |
1011 | 'default' => 'NULL', | |
1012 | 'table_name' => 'civicrm_contribution_page', | |
1013 | 'entity' => 'ContributionPage', | |
1014 | 'bao' => 'CRM_Contribute_BAO_ContributionPage', | |
1015 | 'localizable' => 1, | |
1016 | 'html' => [ | |
1017 | 'type' => 'Text', | |
1018 | ], | |
1019 | ], | |
c3fc2621 | 1020 | ]; |
346aaaba | 1021 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 1022 | } |
346aaaba | 1023 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 1024 | } |
c3fc2621 | 1025 | |
e501603b | 1026 | /** |
bd8e0b14 | 1027 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
1028 | * |
1029 | * @return array | |
bd8e0b14 | 1030 | * Array(string $name => string $uniqueName). |
e501603b | 1031 | */ |
c3fc2621 | 1032 | public static function &fieldKeys() { |
bd8e0b14 TO |
1033 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
1034 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 1035 | } |
bd8e0b14 | 1036 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 1037 | } |
c3fc2621 | 1038 | |
e501603b TO |
1039 | /** |
1040 | * Returns the names of this table | |
1041 | * | |
1042 | * @return string | |
1043 | */ | |
c3fc2621 | 1044 | public static function getTableName() { |
e501603b TO |
1045 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); |
1046 | } | |
c3fc2621 | 1047 | |
e501603b TO |
1048 | /** |
1049 | * Returns if this table needs to be logged | |
1050 | * | |
c3fc2621 | 1051 | * @return bool |
e501603b | 1052 | */ |
c3fc2621 | 1053 | public function getLog() { |
e501603b TO |
1054 | return self::$_log; |
1055 | } | |
c3fc2621 | 1056 | |
e501603b TO |
1057 | /** |
1058 | * Returns the list of fields that can be imported | |
1059 | * | |
1060 | * @param bool $prefix | |
1061 | * | |
1062 | * @return array | |
1063 | */ | |
c3fc2621 CW |
1064 | public static function &import($prefix = FALSE) { |
1065 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_page', $prefix, []); | |
60808919 | 1066 | return $r; |
e501603b | 1067 | } |
c3fc2621 | 1068 | |
e501603b TO |
1069 | /** |
1070 | * Returns the list of fields that can be exported | |
1071 | * | |
1072 | * @param bool $prefix | |
1073 | * | |
1074 | * @return array | |
1075 | */ | |
c3fc2621 CW |
1076 | public static function &export($prefix = FALSE) { |
1077 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_page', $prefix, []); | |
60808919 | 1078 | return $r; |
e501603b | 1079 | } |
c3fc2621 | 1080 | |
e7a6b91a AS |
1081 | /** |
1082 | * Returns the list of indices | |
c3fc2621 CW |
1083 | * |
1084 | * @param bool $localize | |
1085 | * | |
1086 | * @return array | |
e7a6b91a AS |
1087 | */ |
1088 | public static function indices($localize = TRUE) { | |
c3fc2621 | 1089 | $indices = []; |
e7a6b91a AS |
1090 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
1091 | } | |
c3fc2621 | 1092 | |
e501603b | 1093 | } |