Merge pull request #14326 from civicrm/5.14
[civicrm-core.git] / CRM / Financial / DAO / PaymentProcessor.php
CommitLineData
e501603b 1<?php
c3fc2621 2
e501603b
TO
3/**
4 * @package CRM
6b83d5bd 5 * @copyright CiviCRM LLC (c) 2004-2019
e501603b
TO
6 *
7 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
e6ca0a57 9 * (GenCodeChecksum:2d3189beedf083b35929eded03907d9f)
e501603b 10 */
c3fc2621 11
f41f0342 12/**
c3fc2621 13 * Database access object for the PaymentProcessor entity.
f41f0342 14 */
e501603b 15class CRM_Financial_DAO_PaymentProcessor 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_payment_processor';
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 = FALSE;
c3fc2621 30
e501603b
TO
31 /**
32 * Payment Processor ID
33 *
e6ca0a57 34 * @var int
e501603b
TO
35 */
36 public $id;
c3fc2621 37
e501603b
TO
38 /**
39 * Which Domain is this match entry for
40 *
e6ca0a57 41 * @var int
e501603b
TO
42 */
43 public $domain_id;
c3fc2621 44
e501603b
TO
45 /**
46 * Payment Processor Name.
47 *
48 * @var string
49 */
50 public $name;
c3fc2621 51
63b162c6 52 /**
53 * Payment Processor Descriptive Name.
54 *
55 * @var string
56 */
57 public $title;
58
e501603b
TO
59 /**
60 * Payment Processor Description.
61 *
62 * @var string
63 */
64 public $description;
c3fc2621 65
e501603b 66 /**
e6ca0a57 67 * @var int
e501603b
TO
68 */
69 public $payment_processor_type_id;
c3fc2621 70
e501603b
TO
71 /**
72 * Is this processor active?
73 *
e6ca0a57 74 * @var bool
e501603b
TO
75 */
76 public $is_active;
c3fc2621 77
e501603b
TO
78 /**
79 * Is this processor the default?
80 *
e6ca0a57 81 * @var bool
e501603b
TO
82 */
83 public $is_default;
c3fc2621 84
e501603b
TO
85 /**
86 * Is this processor for a test site?
87 *
e6ca0a57 88 * @var bool
e501603b
TO
89 */
90 public $is_test;
c3fc2621 91
e501603b 92 /**
e501603b
TO
93 * @var string
94 */
95 public $user_name;
c3fc2621 96
e501603b 97 /**
e501603b
TO
98 * @var string
99 */
100 public $password;
c3fc2621 101
e501603b 102 /**
e501603b
TO
103 * @var text
104 */
105 public $signature;
c3fc2621 106
e501603b 107 /**
e501603b
TO
108 * @var string
109 */
110 public $url_site;
c3fc2621 111
e501603b 112 /**
e501603b
TO
113 * @var string
114 */
115 public $url_api;
c3fc2621 116
e501603b 117 /**
e501603b
TO
118 * @var string
119 */
120 public $url_recur;
c3fc2621 121
e501603b 122 /**
e501603b
TO
123 * @var string
124 */
125 public $url_button;
c3fc2621 126
e501603b 127 /**
e501603b
TO
128 * @var string
129 */
130 public $subject;
c3fc2621 131
e501603b 132 /**
e501603b
TO
133 * @var string
134 */
135 public $class_name;
c3fc2621 136
e501603b
TO
137 /**
138 * Billing Mode (deprecated)
139 *
e6ca0a57 140 * @var int
e501603b
TO
141 */
142 public $billing_mode;
c3fc2621 143
e501603b
TO
144 /**
145 * Can process recurring contributions
146 *
e6ca0a57 147 * @var bool
e501603b
TO
148 */
149 public $is_recur;
c3fc2621 150
e501603b
TO
151 /**
152 * Payment Type: Credit or Debit (deprecated)
153 *
e6ca0a57 154 * @var int
e501603b
TO
155 */
156 public $payment_type;
c3fc2621 157
e501603b
TO
158 /**
159 * Payment Instrument ID
160 *
e6ca0a57 161 * @var int
e501603b
TO
162 */
163 public $payment_instrument_id;
c3fc2621 164
cb5962bd
SL
165 /**
166 * array of accepted credit card types
167 *
168 * @var text
169 */
170 public $accepted_credit_cards;
c3fc2621 171
e501603b 172 /**
f41f0342 173 * Class constructor.
e501603b 174 */
c3fc2621 175 public function __construct() {
e501603b
TO
176 $this->__table = 'civicrm_payment_processor';
177 parent::__construct();
178 }
c3fc2621 179
e501603b 180 /**
f41f0342 181 * Returns foreign keys and entity references.
e501603b
TO
182 *
183 * @return array
184 * [CRM_Core_Reference_Interface]
185 */
c3fc2621 186 public static function getReferenceColumns() {
346aaaba 187 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 188 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
189 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'domain_id', 'civicrm_domain', 'id');
190 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
346aaaba 191 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 192 }
346aaaba 193 return Civi::$statics[__CLASS__]['links'];
e501603b 194 }
c3fc2621 195
e501603b
TO
196 /**
197 * Returns all the column names of this table
198 *
199 * @return array
200 */
c3fc2621 201 public static function &fields() {
346aaaba 202 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
203 Civi::$statics[__CLASS__]['fields'] = [
204 'id' => [
e501603b
TO
205 'name' => 'id',
206 'type' => CRM_Utils_Type::T_INT,
c3fc2621 207 'title' => ts('Payment Processor ID'),
215b423e 208 'description' => ts('Payment Processor ID'),
c3fc2621 209 'required' => TRUE,
a36434b9 210 'where' => 'civicrm_payment_processor.id',
522a26c9 211 'table_name' => 'civicrm_payment_processor',
212 'entity' => 'PaymentProcessor',
213 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 214 'localizable' => 0,
c3fc2621
CW
215 ],
216 'domain_id' => [
e501603b
TO
217 'name' => 'domain_id',
218 'type' => CRM_Utils_Type::T_INT,
c3fc2621 219 'title' => ts('Payment Processor Domain'),
215b423e 220 'description' => ts('Which Domain is this match entry for'),
c3fc2621 221 'required' => TRUE,
a36434b9 222 'where' => 'civicrm_payment_processor.domain_id',
522a26c9 223 'table_name' => 'civicrm_payment_processor',
224 'entity' => 'PaymentProcessor',
225 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 226 'localizable' => 0,
e501603b 227 'FKClassName' => 'CRM_Core_DAO_Domain',
c3fc2621 228 'pseudoconstant' => [
e501603b
TO
229 'table' => 'civicrm_domain',
230 'keyColumn' => 'id',
231 'labelColumn' => 'name',
e6ca0a57 232 ],
c3fc2621
CW
233 ],
234 'name' => [
e501603b
TO
235 'name' => 'name',
236 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 237 'title' => ts('Payment Processor'),
215b423e 238 'description' => ts('Payment Processor Name.'),
e501603b
TO
239 'maxlength' => 64,
240 'size' => CRM_Utils_Type::BIG,
a36434b9 241 'where' => 'civicrm_payment_processor.name',
522a26c9 242 'table_name' => 'civicrm_payment_processor',
243 'entity' => 'PaymentProcessor',
244 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
63b162c6 245 'localizable' => 0,
246 'html' => [
247 'type' => 'Text',
248 ],
249 ],
250 'title' => [
251 'name' => 'title',
252 'type' => CRM_Utils_Type::T_STRING,
253 'title' => ts('Payment Processor Title'),
254 'description' => ts('Payment Processor Descriptive Name.'),
255 'maxlength' => 127,
256 'size' => CRM_Utils_Type::HUGE,
a36434b9 257 'where' => 'civicrm_payment_processor.title',
63b162c6 258 'table_name' => 'civicrm_payment_processor',
259 'entity' => 'PaymentProcessor',
260 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
4c257e17 261 'localizable' => 1,
c3fc2621 262 'html' => [
1d2a585a 263 'type' => 'Text',
c3fc2621
CW
264 ],
265 ],
266 'description' => [
e501603b
TO
267 'name' => 'description',
268 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 269 'title' => ts('Processor Description'),
215b423e 270 'description' => ts('Payment Processor Description.'),
e501603b
TO
271 'maxlength' => 255,
272 'size' => CRM_Utils_Type::HUGE,
a36434b9 273 'where' => 'civicrm_payment_processor.description',
522a26c9 274 'table_name' => 'civicrm_payment_processor',
275 'entity' => 'PaymentProcessor',
276 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 277 'localizable' => 0,
c3fc2621
CW
278 ],
279 'payment_processor_type_id' => [
e501603b
TO
280 'name' => 'payment_processor_type_id',
281 'type' => CRM_Utils_Type::T_INT,
c3fc2621 282 'title' => ts('Payment Processor Type ID'),
a36434b9 283 'where' => 'civicrm_payment_processor.payment_processor_type_id',
522a26c9 284 'table_name' => 'civicrm_payment_processor',
285 'entity' => 'PaymentProcessor',
286 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 287 'localizable' => 0,
e501603b 288 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
c3fc2621 289 'pseudoconstant' => [
e501603b
TO
290 'table' => 'civicrm_payment_processor_type',
291 'keyColumn' => 'id',
292 'labelColumn' => 'title',
e6ca0a57 293 ],
c3fc2621
CW
294 ],
295 'is_active' => [
e501603b
TO
296 'name' => 'is_active',
297 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 298 'title' => ts('Processor is Active?'),
215b423e 299 'description' => ts('Is this processor active?'),
a36434b9 300 'where' => 'civicrm_payment_processor.is_active',
522a26c9 301 'table_name' => 'civicrm_payment_processor',
302 'entity' => 'PaymentProcessor',
303 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 304 'localizable' => 0,
c3fc2621
CW
305 ],
306 'is_default' => [
e501603b
TO
307 'name' => 'is_default',
308 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 309 'title' => ts('Processor Is Default?'),
215b423e 310 'description' => ts('Is this processor the default?'),
a36434b9 311 'where' => 'civicrm_payment_processor.is_default',
522a26c9 312 'table_name' => 'civicrm_payment_processor',
313 'entity' => 'PaymentProcessor',
314 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 315 'localizable' => 0,
c3fc2621
CW
316 ],
317 'is_test' => [
e501603b
TO
318 'name' => 'is_test',
319 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 320 'title' => ts('Is Test Processor?'),
215b423e 321 'description' => ts('Is this processor for a test site?'),
a36434b9 322 'where' => 'civicrm_payment_processor.is_test',
522a26c9 323 'table_name' => 'civicrm_payment_processor',
324 'entity' => 'PaymentProcessor',
325 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 326 'localizable' => 0,
c3fc2621
CW
327 ],
328 'user_name' => [
e501603b
TO
329 'name' => 'user_name',
330 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 331 'title' => ts('User Name'),
e501603b
TO
332 'maxlength' => 255,
333 'size' => CRM_Utils_Type::HUGE,
a36434b9 334 'where' => 'civicrm_payment_processor.user_name',
522a26c9 335 'table_name' => 'civicrm_payment_processor',
336 'entity' => 'PaymentProcessor',
337 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 338 'localizable' => 0,
c3fc2621 339 'html' => [
1d2a585a 340 'type' => 'Text',
c3fc2621
CW
341 ],
342 ],
343 'password' => [
e501603b
TO
344 'name' => 'password',
345 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 346 'title' => ts('Password'),
e501603b
TO
347 'maxlength' => 255,
348 'size' => CRM_Utils_Type::HUGE,
a36434b9 349 'where' => 'civicrm_payment_processor.password',
522a26c9 350 'table_name' => 'civicrm_payment_processor',
351 'entity' => 'PaymentProcessor',
352 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 353 'localizable' => 0,
c3fc2621 354 'html' => [
dbb62458 355 'type' => 'Password',
c3fc2621
CW
356 ],
357 ],
358 'signature' => [
e501603b
TO
359 'name' => 'signature',
360 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 361 'title' => ts('Signature'),
1d2a585a 362 'rows' => 4,
363 'cols' => 40,
a36434b9 364 'where' => 'civicrm_payment_processor.signature',
522a26c9 365 'table_name' => 'civicrm_payment_processor',
366 'entity' => 'PaymentProcessor',
367 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 368 'localizable' => 0,
c3fc2621 369 'html' => [
1d2a585a 370 'type' => 'TextArea',
c3fc2621
CW
371 ],
372 ],
373 'url_site' => [
e501603b
TO
374 'name' => 'url_site',
375 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 376 'title' => ts('Site URL'),
e501603b
TO
377 'maxlength' => 255,
378 'size' => CRM_Utils_Type::HUGE,
a36434b9 379 'where' => 'civicrm_payment_processor.url_site',
522a26c9 380 'table_name' => 'civicrm_payment_processor',
381 'entity' => 'PaymentProcessor',
382 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 383 'localizable' => 0,
c3fc2621 384 'html' => [
1d2a585a 385 'type' => 'Text',
c3fc2621
CW
386 ],
387 ],
388 'url_api' => [
e501603b
TO
389 'name' => 'url_api',
390 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 391 'title' => ts('API URL'),
e501603b
TO
392 'maxlength' => 255,
393 'size' => CRM_Utils_Type::HUGE,
a36434b9 394 'where' => 'civicrm_payment_processor.url_api',
522a26c9 395 'table_name' => 'civicrm_payment_processor',
396 'entity' => 'PaymentProcessor',
397 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 398 'localizable' => 0,
c3fc2621 399 'html' => [
1d2a585a 400 'type' => 'Text',
c3fc2621
CW
401 ],
402 ],
403 'url_recur' => [
e501603b
TO
404 'name' => 'url_recur',
405 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 406 'title' => ts('Recurring Payments URL'),
e501603b
TO
407 'maxlength' => 255,
408 'size' => CRM_Utils_Type::HUGE,
a36434b9 409 'where' => 'civicrm_payment_processor.url_recur',
522a26c9 410 'table_name' => 'civicrm_payment_processor',
411 'entity' => 'PaymentProcessor',
412 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 413 'localizable' => 0,
c3fc2621 414 'html' => [
1d2a585a 415 'type' => 'Text',
c3fc2621
CW
416 ],
417 ],
418 'url_button' => [
e501603b
TO
419 'name' => 'url_button',
420 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 421 'title' => ts('Button URL'),
e501603b
TO
422 'maxlength' => 255,
423 'size' => CRM_Utils_Type::HUGE,
a36434b9 424 'where' => 'civicrm_payment_processor.url_button',
522a26c9 425 'table_name' => 'civicrm_payment_processor',
426 'entity' => 'PaymentProcessor',
427 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 428 'localizable' => 0,
c3fc2621 429 'html' => [
1d2a585a 430 'type' => 'Text',
c3fc2621
CW
431 ],
432 ],
433 'subject' => [
e501603b
TO
434 'name' => 'subject',
435 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 436 'title' => ts('Subject'),
e501603b
TO
437 'maxlength' => 255,
438 'size' => CRM_Utils_Type::HUGE,
a36434b9 439 'where' => 'civicrm_payment_processor.subject',
522a26c9 440 'table_name' => 'civicrm_payment_processor',
441 'entity' => 'PaymentProcessor',
442 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 443 'localizable' => 0,
c3fc2621 444 'html' => [
1d2a585a 445 'type' => 'Text',
c3fc2621
CW
446 ],
447 ],
448 'class_name' => [
e501603b
TO
449 'name' => 'class_name',
450 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 451 'title' => ts('Suffix for PHP class name implementation'),
e501603b
TO
452 'maxlength' => 255,
453 'size' => CRM_Utils_Type::HUGE,
a36434b9 454 'where' => 'civicrm_payment_processor.class_name',
522a26c9 455 'table_name' => 'civicrm_payment_processor',
456 'entity' => 'PaymentProcessor',
457 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 458 'localizable' => 0,
c3fc2621
CW
459 ],
460 'billing_mode' => [
e501603b
TO
461 'name' => 'billing_mode',
462 'type' => CRM_Utils_Type::T_INT,
c3fc2621 463 'title' => ts('Processor Billing Mode'),
215b423e 464 'description' => ts('Billing Mode (deprecated)'),
c3fc2621 465 'required' => TRUE,
a36434b9 466 'where' => 'civicrm_payment_processor.billing_mode',
522a26c9 467 'table_name' => 'civicrm_payment_processor',
468 'entity' => 'PaymentProcessor',
469 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 470 'localizable' => 0,
c3fc2621
CW
471 ],
472 'is_recur' => [
e501603b
TO
473 'name' => 'is_recur',
474 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 475 'title' => ts('Processor Supports Recurring?'),
215b423e 476 'description' => ts('Can process recurring contributions'),
a36434b9 477 'where' => 'civicrm_payment_processor.is_recur',
522a26c9 478 'table_name' => 'civicrm_payment_processor',
479 'entity' => 'PaymentProcessor',
480 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 481 'localizable' => 0,
c3fc2621
CW
482 ],
483 'payment_type' => [
e501603b
TO
484 'name' => 'payment_type',
485 'type' => CRM_Utils_Type::T_INT,
c3fc2621 486 'title' => ts('Payment Type'),
215b423e 487 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
a36434b9 488 'where' => 'civicrm_payment_processor.payment_type',
e501603b 489 'default' => '1',
522a26c9 490 'table_name' => 'civicrm_payment_processor',
491 'entity' => 'PaymentProcessor',
492 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 493 'localizable' => 0,
c3fc2621
CW
494 ],
495 'payment_instrument_id' => [
e501603b
TO
496 'name' => 'payment_instrument_id',
497 'type' => CRM_Utils_Type::T_INT,
c3fc2621 498 'title' => ts('Payment Method'),
215b423e 499 'description' => ts('Payment Instrument ID'),
a36434b9 500 'where' => 'civicrm_payment_processor.payment_instrument_id',
e501603b 501 'default' => '1',
522a26c9 502 'table_name' => 'civicrm_payment_processor',
503 'entity' => 'PaymentProcessor',
504 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 505 'localizable' => 0,
c3fc2621 506 'pseudoconstant' => [
e501603b
TO
507 'optionGroupName' => 'payment_instrument',
508 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
e6ca0a57 509 ],
c3fc2621
CW
510 ],
511 'accepted_credit_cards' => [
cb5962bd
SL
512 'name' => 'accepted_credit_cards',
513 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 514 'title' => ts('Accepted Credit Cards'),
215b423e 515 'description' => ts('array of accepted credit card types'),
a36434b9 516 'where' => 'civicrm_payment_processor.accepted_credit_cards',
cb5962bd 517 'default' => 'NULL',
522a26c9 518 'table_name' => 'civicrm_payment_processor',
519 'entity' => 'PaymentProcessor',
520 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 521 'localizable' => 0,
2a5c9b4d 522 'serialize' => self::SERIALIZE_JSON,
c3fc2621
CW
523 ],
524 ];
346aaaba 525 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 526 }
346aaaba 527 return Civi::$statics[__CLASS__]['fields'];
e501603b 528 }
c3fc2621 529
e501603b 530 /**
bd8e0b14 531 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
532 *
533 * @return array
bd8e0b14 534 * Array(string $name => string $uniqueName).
e501603b 535 */
c3fc2621 536 public static function &fieldKeys() {
bd8e0b14
TO
537 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
538 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 539 }
bd8e0b14 540 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 541 }
c3fc2621 542
e501603b
TO
543 /**
544 * Returns the names of this table
545 *
546 * @return string
547 */
c3fc2621 548 public static function getTableName() {
4c257e17 549 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
e501603b 550 }
c3fc2621 551
e501603b
TO
552 /**
553 * Returns if this table needs to be logged
554 *
c3fc2621 555 * @return bool
e501603b 556 */
c3fc2621 557 public function getLog() {
e501603b
TO
558 return self::$_log;
559 }
c3fc2621 560
e501603b
TO
561 /**
562 * Returns the list of fields that can be imported
563 *
564 * @param bool $prefix
565 *
566 * @return array
567 */
c3fc2621
CW
568 public static function &import($prefix = FALSE) {
569 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, []);
60808919 570 return $r;
e501603b 571 }
c3fc2621 572
e501603b
TO
573 /**
574 * Returns the list of fields that can be exported
575 *
576 * @param bool $prefix
577 *
578 * @return array
579 */
c3fc2621
CW
580 public static function &export($prefix = FALSE) {
581 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, []);
60808919 582 return $r;
e501603b 583 }
c3fc2621 584
e7a6b91a
AS
585 /**
586 * Returns the list of indices
c3fc2621
CW
587 *
588 * @param bool $localize
589 *
590 * @return array
e7a6b91a
AS
591 */
592 public static function indices($localize = TRUE) {
c3fc2621
CW
593 $indices = [
594 'UI_name_test_domain_id' => [
e7a6b91a 595 'name' => 'UI_name_test_domain_id',
c3fc2621 596 'field' => [
e7a6b91a
AS
597 0 => 'name',
598 1 => 'is_test',
599 2 => 'domain_id',
c3fc2621
CW
600 ],
601 'localizable' => FALSE,
602 'unique' => TRUE,
e7a6b91a 603 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
c3fc2621
CW
604 ],
605 ];
e7a6b91a
AS
606 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
607 }
c3fc2621 608
e501603b 609}