Merge pull request #21917 from braders/feature/translate-set-title-calls
[civicrm-core.git] / CRM / Pledge / DAO / Pledge.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC https://civicrm.org/licensing
6 *
7 * Generated from xml/schema/CRM/Pledge/Pledge.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:bcc7d49479de858804a09bf49c1ebda9)
10 */
11
12 /**
13 * Database access object for the Pledge entity.
14 */
15 class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '2.1';
18 const COMPONENT = 'CiviPledge';
19
20 /**
21 * Static instance to hold the table name.
22 *
23 * @var string
24 */
25 public static $_tableName = 'civicrm_pledge';
26
27 /**
28 * Icon associated with this entity.
29 *
30 * @var string
31 */
32 public static $_icon = 'fa-paper-plane';
33
34 /**
35 * Should CiviCRM log any modifications to this table in the civicrm_log table.
36 *
37 * @var bool
38 */
39 public static $_log = TRUE;
40
41 /**
42 * Pledge ID
43 *
44 * @var int
45 */
46 public $id;
47
48 /**
49 * Foreign key to civicrm_contact.id .
50 *
51 * @var int
52 */
53 public $contact_id;
54
55 /**
56 * FK to Financial Type
57 *
58 * @var int
59 */
60 public $financial_type_id;
61
62 /**
63 * The Contribution Page which triggered this contribution
64 *
65 * @var int
66 */
67 public $contribution_page_id;
68
69 /**
70 * Total pledged amount.
71 *
72 * @var float
73 */
74 public $amount;
75
76 /**
77 * Original amount for each of the installments.
78 *
79 * @var float
80 */
81 public $original_installment_amount;
82
83 /**
84 * 3 character string, value from config setting or input via user.
85 *
86 * @var string
87 */
88 public $currency;
89
90 /**
91 * Time units for recurrence of pledge payments.
92 *
93 * @var string
94 */
95 public $frequency_unit;
96
97 /**
98 * Number of time units for recurrence of pledge payments.
99 *
100 * @var int
101 */
102 public $frequency_interval;
103
104 /**
105 * Day in the period when the pledge payment is due e.g. 1st of month, 15th etc. Use this to set the scheduled dates for pledge payments.
106 *
107 * @var int
108 */
109 public $frequency_day;
110
111 /**
112 * Total number of payments to be made.
113 *
114 * @var int
115 */
116 public $installments;
117
118 /**
119 * The date the first scheduled pledge occurs.
120 *
121 * @var datetime
122 */
123 public $start_date;
124
125 /**
126 * When this pledge record was created.
127 *
128 * @var datetime
129 */
130 public $create_date;
131
132 /**
133 * When a pledge acknowledgement message was sent to the contributor.
134 *
135 * @var datetime
136 */
137 public $acknowledge_date;
138
139 /**
140 * Last updated date for this pledge record.
141 *
142 * @var datetime
143 */
144 public $modified_date;
145
146 /**
147 * Date this pledge was cancelled by contributor.
148 *
149 * @var datetime
150 */
151 public $cancel_date;
152
153 /**
154 * Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).
155 *
156 * @var datetime
157 */
158 public $end_date;
159
160 /**
161 * The maximum number of payment reminders to send for any given payment.
162 *
163 * @var int
164 */
165 public $max_reminders;
166
167 /**
168 * Send initial reminder this many days prior to the payment due date.
169 *
170 * @var int
171 */
172 public $initial_reminder_day;
173
174 /**
175 * Send additional reminder this many days after last one sent, up to maximum number of reminders.
176 *
177 * @var int
178 */
179 public $additional_reminder_day;
180
181 /**
182 * Implicit foreign key to civicrm_option_values in the pledge_status option group.
183 *
184 * @var int
185 */
186 public $status_id;
187
188 /**
189 * @var bool
190 */
191 public $is_test;
192
193 /**
194 * The campaign for which this pledge has been initiated.
195 *
196 * @var int
197 */
198 public $campaign_id;
199
200 /**
201 * Class constructor.
202 */
203 public function __construct() {
204 $this->__table = 'civicrm_pledge';
205 parent::__construct();
206 }
207
208 /**
209 * Returns localized title of this entity.
210 *
211 * @param bool $plural
212 * Whether to return the plural version of the title.
213 */
214 public static function getEntityTitle($plural = FALSE) {
215 return $plural ? ts('Pledges') : ts('Pledge');
216 }
217
218 /**
219 * Returns user-friendly description of this entity.
220 *
221 * @return string
222 */
223 public static function getEntityDescription() {
224 return ts('Promises to contribute at a future time, either in full, or at regular intervals until a total goal is reached.');
225 }
226
227 /**
228 * Returns foreign keys and entity references.
229 *
230 * @return array
231 * [CRM_Core_Reference_Interface]
232 */
233 public static function getReferenceColumns() {
234 if (!isset(Civi::$statics[__CLASS__]['links'])) {
235 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
236 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
237 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'financial_type_id', 'civicrm_financial_type', 'id');
238 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contribution_page_id', 'civicrm_contribution_page', 'id');
239 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'campaign_id', 'civicrm_campaign', 'id');
240 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
241 }
242 return Civi::$statics[__CLASS__]['links'];
243 }
244
245 /**
246 * Returns all the column names of this table
247 *
248 * @return array
249 */
250 public static function &fields() {
251 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
252 Civi::$statics[__CLASS__]['fields'] = [
253 'pledge_id' => [
254 'name' => 'id',
255 'type' => CRM_Utils_Type::T_INT,
256 'title' => ts('Pledge ID'),
257 'description' => ts('Pledge ID'),
258 'required' => TRUE,
259 'import' => TRUE,
260 'where' => 'civicrm_pledge.id',
261 'export' => TRUE,
262 'table_name' => 'civicrm_pledge',
263 'entity' => 'Pledge',
264 'bao' => 'CRM_Pledge_BAO_Pledge',
265 'localizable' => 0,
266 'html' => [
267 'type' => 'Number',
268 ],
269 'readonly' => TRUE,
270 'add' => '2.1',
271 ],
272 'pledge_contact_id' => [
273 'name' => 'contact_id',
274 'type' => CRM_Utils_Type::T_INT,
275 'title' => ts('Contact ID'),
276 'description' => ts('Foreign key to civicrm_contact.id .'),
277 'required' => TRUE,
278 'import' => TRUE,
279 'where' => 'civicrm_pledge.contact_id',
280 'export' => TRUE,
281 'table_name' => 'civicrm_pledge',
282 'entity' => 'Pledge',
283 'bao' => 'CRM_Pledge_BAO_Pledge',
284 'localizable' => 0,
285 'FKClassName' => 'CRM_Contact_DAO_Contact',
286 'html' => [
287 'type' => 'EntityRef',
288 'label' => ts("Contact"),
289 ],
290 'add' => '2.1',
291 ],
292 'pledge_financial_type_id' => [
293 'name' => 'financial_type_id',
294 'type' => CRM_Utils_Type::T_INT,
295 'title' => ts('Financial Type ID'),
296 'description' => ts('FK to Financial Type'),
297 'where' => 'civicrm_pledge.financial_type_id',
298 'table_name' => 'civicrm_pledge',
299 'entity' => 'Pledge',
300 'bao' => 'CRM_Pledge_BAO_Pledge',
301 'localizable' => 0,
302 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
303 'html' => [
304 'type' => 'Select',
305 'label' => ts("Financial Type"),
306 ],
307 'pseudoconstant' => [
308 'table' => 'civicrm_financial_type',
309 'keyColumn' => 'id',
310 'labelColumn' => 'name',
311 ],
312 'add' => '4.3',
313 ],
314 'pledge_contribution_page_id' => [
315 'name' => 'contribution_page_id',
316 'type' => CRM_Utils_Type::T_INT,
317 'title' => ts('Contribution Page ID'),
318 'description' => ts('The Contribution Page which triggered this contribution'),
319 'where' => 'civicrm_pledge.contribution_page_id',
320 'table_name' => 'civicrm_pledge',
321 'entity' => 'Pledge',
322 'bao' => 'CRM_Pledge_BAO_Pledge',
323 'localizable' => 0,
324 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
325 'html' => [
326 'label' => ts("Contribution Page"),
327 ],
328 'add' => '2.1',
329 ],
330 'pledge_amount' => [
331 'name' => 'amount',
332 'type' => CRM_Utils_Type::T_MONEY,
333 'title' => ts('Total Pledged'),
334 'description' => ts('Total pledged amount.'),
335 'required' => TRUE,
336 'precision' => [
337 20,
338 2,
339 ],
340 'import' => TRUE,
341 'where' => 'civicrm_pledge.amount',
342 'export' => TRUE,
343 'table_name' => 'civicrm_pledge',
344 'entity' => 'Pledge',
345 'bao' => 'CRM_Pledge_BAO_Pledge',
346 'localizable' => 0,
347 'html' => [
348 'type' => 'Text',
349 ],
350 'add' => '2.1',
351 ],
352 'pledge_original_installment_amount' => [
353 'name' => 'original_installment_amount',
354 'type' => CRM_Utils_Type::T_MONEY,
355 'title' => ts('Original Installment Amount'),
356 'description' => ts('Original amount for each of the installments.'),
357 'required' => TRUE,
358 'precision' => [
359 20,
360 2,
361 ],
362 'where' => 'civicrm_pledge.original_installment_amount',
363 'export' => TRUE,
364 'table_name' => 'civicrm_pledge',
365 'entity' => 'Pledge',
366 'bao' => 'CRM_Pledge_BAO_Pledge',
367 'localizable' => 0,
368 'html' => [
369 'type' => 'Text',
370 ],
371 'add' => '3.2',
372 ],
373 'currency' => [
374 'name' => 'currency',
375 'type' => CRM_Utils_Type::T_STRING,
376 'title' => ts('Pledge Currency'),
377 'description' => ts('3 character string, value from config setting or input via user.'),
378 'maxlength' => 3,
379 'size' => CRM_Utils_Type::FOUR,
380 'where' => 'civicrm_pledge.currency',
381 'default' => NULL,
382 'table_name' => 'civicrm_pledge',
383 'entity' => 'Pledge',
384 'bao' => 'CRM_Pledge_BAO_Pledge',
385 'localizable' => 0,
386 'html' => [
387 'type' => 'Select',
388 ],
389 'pseudoconstant' => [
390 'table' => 'civicrm_currency',
391 'keyColumn' => 'name',
392 'labelColumn' => 'full_name',
393 'nameColumn' => 'name',
394 'abbrColumn' => 'symbol',
395 ],
396 'add' => '3.2',
397 ],
398 'pledge_frequency_unit' => [
399 'name' => 'frequency_unit',
400 'type' => CRM_Utils_Type::T_STRING,
401 'title' => ts('Pledge Frequency Unit'),
402 'description' => ts('Time units for recurrence of pledge payments.'),
403 'required' => TRUE,
404 'maxlength' => 8,
405 'size' => CRM_Utils_Type::EIGHT,
406 'where' => 'civicrm_pledge.frequency_unit',
407 'default' => 'month',
408 'table_name' => 'civicrm_pledge',
409 'entity' => 'Pledge',
410 'bao' => 'CRM_Pledge_BAO_Pledge',
411 'localizable' => 0,
412 'html' => [
413 'type' => 'Select',
414 ],
415 'pseudoconstant' => [
416 'optionGroupName' => 'recur_frequency_units',
417 'keyColumn' => 'name',
418 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
419 ],
420 'add' => '2.1',
421 ],
422 'pledge_frequency_interval' => [
423 'name' => 'frequency_interval',
424 'type' => CRM_Utils_Type::T_INT,
425 'title' => ts('Pledge Frequency Interval'),
426 'description' => ts('Number of time units for recurrence of pledge payments.'),
427 'required' => TRUE,
428 'where' => 'civicrm_pledge.frequency_interval',
429 'default' => '1',
430 'table_name' => 'civicrm_pledge',
431 'entity' => 'Pledge',
432 'bao' => 'CRM_Pledge_BAO_Pledge',
433 'localizable' => 0,
434 'html' => [
435 'type' => 'Text',
436 ],
437 'add' => '2.1',
438 ],
439 'frequency_day' => [
440 'name' => 'frequency_day',
441 'type' => CRM_Utils_Type::T_INT,
442 'title' => ts('Pledge day'),
443 'description' => ts('Day in the period when the pledge payment is due e.g. 1st of month, 15th etc. Use this to set the scheduled dates for pledge payments.'),
444 'required' => TRUE,
445 'where' => 'civicrm_pledge.frequency_day',
446 'default' => '3',
447 'table_name' => 'civicrm_pledge',
448 'entity' => 'Pledge',
449 'bao' => 'CRM_Pledge_BAO_Pledge',
450 'localizable' => 0,
451 'html' => [
452 'type' => 'Select',
453 ],
454 'add' => '2.1',
455 ],
456 'installments' => [
457 'name' => 'installments',
458 'type' => CRM_Utils_Type::T_INT,
459 'title' => ts('Pledge Number of Installments'),
460 'description' => ts('Total number of payments to be made.'),
461 'required' => TRUE,
462 'where' => 'civicrm_pledge.installments',
463 'export' => TRUE,
464 'default' => '1',
465 'table_name' => 'civicrm_pledge',
466 'entity' => 'Pledge',
467 'bao' => 'CRM_Pledge_BAO_Pledge',
468 'localizable' => 0,
469 'html' => [
470 'type' => 'Text',
471 ],
472 'add' => '2.1',
473 ],
474 'pledge_start_date' => [
475 'name' => 'start_date',
476 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
477 'title' => ts('Pledge Start Date'),
478 'description' => ts('The date the first scheduled pledge occurs.'),
479 'required' => TRUE,
480 'where' => 'civicrm_pledge.start_date',
481 'export' => TRUE,
482 'table_name' => 'civicrm_pledge',
483 'entity' => 'Pledge',
484 'bao' => 'CRM_Pledge_BAO_Pledge',
485 'localizable' => 0,
486 'unique_title' => ts('Payments Start Date'),
487 'html' => [
488 'type' => 'Select Date',
489 'formatType' => 'activityDate',
490 ],
491 'add' => '2.1',
492 ],
493 'pledge_create_date' => [
494 'name' => 'create_date',
495 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
496 'title' => ts('Pledge Made'),
497 'description' => ts('When this pledge record was created.'),
498 'required' => TRUE,
499 'import' => TRUE,
500 'where' => 'civicrm_pledge.create_date',
501 'export' => TRUE,
502 'table_name' => 'civicrm_pledge',
503 'entity' => 'Pledge',
504 'bao' => 'CRM_Pledge_BAO_Pledge',
505 'localizable' => 0,
506 'html' => [
507 'type' => 'Select Date',
508 'formatType' => 'activityDate',
509 ],
510 'add' => '2.1',
511 ],
512 'acknowledge_date' => [
513 'name' => 'acknowledge_date',
514 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
515 'title' => ts('Pledge Acknowledged'),
516 'description' => ts('When a pledge acknowledgement message was sent to the contributor.'),
517 'where' => 'civicrm_pledge.acknowledge_date',
518 'table_name' => 'civicrm_pledge',
519 'entity' => 'Pledge',
520 'bao' => 'CRM_Pledge_BAO_Pledge',
521 'localizable' => 0,
522 'html' => [
523 'type' => 'Select Date',
524 'formatType' => 'activityDate',
525 ],
526 'add' => '2.1',
527 ],
528 'modified_date' => [
529 'name' => 'modified_date',
530 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
531 'title' => ts('Pledge Modified Date'),
532 'description' => ts('Last updated date for this pledge record.'),
533 'where' => 'civicrm_pledge.modified_date',
534 'table_name' => 'civicrm_pledge',
535 'entity' => 'Pledge',
536 'bao' => 'CRM_Pledge_BAO_Pledge',
537 'localizable' => 0,
538 'readonly' => TRUE,
539 'add' => '2.1',
540 ],
541 'cancel_date' => [
542 'name' => 'cancel_date',
543 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
544 'title' => ts('Pledge Cancelled Date'),
545 'description' => ts('Date this pledge was cancelled by contributor.'),
546 'where' => 'civicrm_pledge.cancel_date',
547 'table_name' => 'civicrm_pledge',
548 'entity' => 'Pledge',
549 'bao' => 'CRM_Pledge_BAO_Pledge',
550 'localizable' => 0,
551 'html' => [
552 'type' => 'Select Date',
553 'formatType' => 'activityDate',
554 ],
555 'add' => '2.1',
556 ],
557 'pledge_end_date' => [
558 'name' => 'end_date',
559 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
560 'title' => ts('Pledge End Date'),
561 'description' => ts('Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).'),
562 'where' => 'civicrm_pledge.end_date',
563 'export' => TRUE,
564 'table_name' => 'civicrm_pledge',
565 'entity' => 'Pledge',
566 'bao' => 'CRM_Pledge_BAO_Pledge',
567 'localizable' => 0,
568 'unique_title' => ts('Payments Ended Date'),
569 'html' => [
570 'type' => 'Select Date',
571 'formatType' => 'activityDate',
572 ],
573 'add' => '2.1',
574 ],
575 'max_reminders' => [
576 'name' => 'max_reminders',
577 'type' => CRM_Utils_Type::T_INT,
578 'title' => ts('Maximum Number of Reminders'),
579 'description' => ts('The maximum number of payment reminders to send for any given payment.'),
580 'where' => 'civicrm_pledge.max_reminders',
581 'default' => '1',
582 'table_name' => 'civicrm_pledge',
583 'entity' => 'Pledge',
584 'bao' => 'CRM_Pledge_BAO_Pledge',
585 'localizable' => 0,
586 'html' => [
587 'type' => 'Text',
588 ],
589 'add' => '2.1',
590 ],
591 'initial_reminder_day' => [
592 'name' => 'initial_reminder_day',
593 'type' => CRM_Utils_Type::T_INT,
594 'title' => ts('Initial Reminder Day'),
595 'description' => ts('Send initial reminder this many days prior to the payment due date.'),
596 'where' => 'civicrm_pledge.initial_reminder_day',
597 'default' => '5',
598 'table_name' => 'civicrm_pledge',
599 'entity' => 'Pledge',
600 'bao' => 'CRM_Pledge_BAO_Pledge',
601 'localizable' => 0,
602 'html' => [
603 'type' => 'Select',
604 ],
605 'add' => '2.1',
606 ],
607 'additional_reminder_day' => [
608 'name' => 'additional_reminder_day',
609 'type' => CRM_Utils_Type::T_INT,
610 'title' => ts('Additional Reminder Days'),
611 'description' => ts('Send additional reminder this many days after last one sent, up to maximum number of reminders.'),
612 'where' => 'civicrm_pledge.additional_reminder_day',
613 'default' => '5',
614 'table_name' => 'civicrm_pledge',
615 'entity' => 'Pledge',
616 'bao' => 'CRM_Pledge_BAO_Pledge',
617 'localizable' => 0,
618 'html' => [
619 'type' => 'Text',
620 ],
621 'add' => '2.1',
622 ],
623 'pledge_status_id' => [
624 'name' => 'status_id',
625 'type' => CRM_Utils_Type::T_INT,
626 'title' => ts('Pledge Status ID'),
627 'description' => ts('Implicit foreign key to civicrm_option_values in the pledge_status option group.'),
628 'required' => TRUE,
629 'import' => TRUE,
630 'where' => 'civicrm_pledge.status_id',
631 'export' => FALSE,
632 'table_name' => 'civicrm_pledge',
633 'entity' => 'Pledge',
634 'bao' => 'CRM_Pledge_BAO_Pledge',
635 'localizable' => 0,
636 'html' => [
637 'type' => 'Select',
638 ],
639 'pseudoconstant' => [
640 'optionGroupName' => 'pledge_status',
641 'optionEditPath' => 'civicrm/admin/options/pledge_status',
642 ],
643 'add' => '2.1',
644 ],
645 'pledge_is_test' => [
646 'name' => 'is_test',
647 'type' => CRM_Utils_Type::T_BOOLEAN,
648 'title' => ts('Test'),
649 'required' => TRUE,
650 'import' => TRUE,
651 'where' => 'civicrm_pledge.is_test',
652 'export' => TRUE,
653 'default' => '0',
654 'table_name' => 'civicrm_pledge',
655 'entity' => 'Pledge',
656 'bao' => 'CRM_Pledge_BAO_Pledge',
657 'localizable' => 0,
658 'html' => [
659 'type' => 'CheckBox',
660 ],
661 'add' => NULL,
662 ],
663 'pledge_campaign_id' => [
664 'name' => 'campaign_id',
665 'type' => CRM_Utils_Type::T_INT,
666 'title' => ts('Campaign ID'),
667 'description' => ts('The campaign for which this pledge has been initiated.'),
668 'import' => TRUE,
669 'where' => 'civicrm_pledge.campaign_id',
670 'export' => TRUE,
671 'table_name' => 'civicrm_pledge',
672 'entity' => 'Pledge',
673 'bao' => 'CRM_Pledge_BAO_Pledge',
674 'localizable' => 0,
675 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
676 'component' => 'CiviCampaign',
677 'html' => [
678 'type' => 'EntityRef',
679 'label' => ts("Campaign"),
680 ],
681 'pseudoconstant' => [
682 'table' => 'civicrm_campaign',
683 'keyColumn' => 'id',
684 'labelColumn' => 'title',
685 'prefetch' => 'FALSE',
686 ],
687 'add' => '3.4',
688 ],
689 ];
690 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
691 }
692 return Civi::$statics[__CLASS__]['fields'];
693 }
694
695 /**
696 * Return a mapping from field-name to the corresponding key (as used in fields()).
697 *
698 * @return array
699 * Array(string $name => string $uniqueName).
700 */
701 public static function &fieldKeys() {
702 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
703 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
704 }
705 return Civi::$statics[__CLASS__]['fieldKeys'];
706 }
707
708 /**
709 * Returns the names of this table
710 *
711 * @return string
712 */
713 public static function getTableName() {
714 return self::$_tableName;
715 }
716
717 /**
718 * Returns if this table needs to be logged
719 *
720 * @return bool
721 */
722 public function getLog() {
723 return self::$_log;
724 }
725
726 /**
727 * Returns the list of fields that can be imported
728 *
729 * @param bool $prefix
730 *
731 * @return array
732 */
733 public static function &import($prefix = FALSE) {
734 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pledge', $prefix, []);
735 return $r;
736 }
737
738 /**
739 * Returns the list of fields that can be exported
740 *
741 * @param bool $prefix
742 *
743 * @return array
744 */
745 public static function &export($prefix = FALSE) {
746 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pledge', $prefix, []);
747 return $r;
748 }
749
750 /**
751 * Returns the list of indices
752 *
753 * @param bool $localize
754 *
755 * @return array
756 */
757 public static function indices($localize = TRUE) {
758 $indices = [
759 'index_status' => [
760 'name' => 'index_status',
761 'field' => [
762 0 => 'status_id',
763 ],
764 'localizable' => FALSE,
765 'sig' => 'civicrm_pledge::0::status_id',
766 ],
767 ];
768 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
769 }
770
771 }