Merge pull request #17491 from eileenmcnaughton/toemail
[civicrm-core.git] / CRM / Financial / DAO / PaymentProcessor.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/Financial/PaymentProcessor.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
449c4e6b 9 * (GenCodeChecksum:5ed40da0dfabffcfec0b61650d63dd27)
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
449c4e6b
CW
180 /**
181 * Returns localized title of this entity.
182 */
183 public static function getEntityTitle() {
184 return ts('Payment Processors');
185 }
186
e501603b 187 /**
f41f0342 188 * Returns foreign keys and entity references.
e501603b
TO
189 *
190 * @return array
191 * [CRM_Core_Reference_Interface]
192 */
c3fc2621 193 public static function getReferenceColumns() {
346aaaba 194 if (!isset(Civi::$statics[__CLASS__]['links'])) {
fa45b5b9 195 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
c3fc2621
CW
196 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'domain_id', 'civicrm_domain', 'id');
197 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
346aaaba 198 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 199 }
346aaaba 200 return Civi::$statics[__CLASS__]['links'];
e501603b 201 }
c3fc2621 202
e501603b
TO
203 /**
204 * Returns all the column names of this table
205 *
206 * @return array
207 */
c3fc2621 208 public static function &fields() {
346aaaba 209 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
c3fc2621
CW
210 Civi::$statics[__CLASS__]['fields'] = [
211 'id' => [
e501603b
TO
212 'name' => 'id',
213 'type' => CRM_Utils_Type::T_INT,
c3fc2621 214 'title' => ts('Payment Processor ID'),
215b423e 215 'description' => ts('Payment Processor ID'),
c3fc2621 216 'required' => TRUE,
a36434b9 217 'where' => 'civicrm_payment_processor.id',
522a26c9 218 'table_name' => 'civicrm_payment_processor',
219 'entity' => 'PaymentProcessor',
220 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 221 'localizable' => 0,
c3fc2621
CW
222 ],
223 'domain_id' => [
e501603b
TO
224 'name' => 'domain_id',
225 'type' => CRM_Utils_Type::T_INT,
c3fc2621 226 'title' => ts('Payment Processor Domain'),
215b423e 227 'description' => ts('Which Domain is this match entry for'),
c3fc2621 228 'required' => TRUE,
a36434b9 229 'where' => 'civicrm_payment_processor.domain_id',
522a26c9 230 'table_name' => 'civicrm_payment_processor',
231 'entity' => 'PaymentProcessor',
232 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 233 'localizable' => 0,
e501603b 234 'FKClassName' => 'CRM_Core_DAO_Domain',
c3fc2621 235 'pseudoconstant' => [
e501603b
TO
236 'table' => 'civicrm_domain',
237 'keyColumn' => 'id',
238 'labelColumn' => 'name',
e6ca0a57 239 ],
c3fc2621
CW
240 ],
241 'name' => [
e501603b
TO
242 'name' => 'name',
243 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 244 'title' => ts('Payment Processor'),
215b423e 245 'description' => ts('Payment Processor Name.'),
e501603b
TO
246 'maxlength' => 64,
247 'size' => CRM_Utils_Type::BIG,
a36434b9 248 'where' => 'civicrm_payment_processor.name',
522a26c9 249 'table_name' => 'civicrm_payment_processor',
250 'entity' => 'PaymentProcessor',
251 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
63b162c6 252 'localizable' => 0,
253 'html' => [
254 'type' => 'Text',
255 ],
256 ],
257 'title' => [
258 'name' => 'title',
259 'type' => CRM_Utils_Type::T_STRING,
260 'title' => ts('Payment Processor Title'),
261 'description' => ts('Payment Processor Descriptive Name.'),
262 'maxlength' => 127,
263 'size' => CRM_Utils_Type::HUGE,
a36434b9 264 'where' => 'civicrm_payment_processor.title',
63b162c6 265 'table_name' => 'civicrm_payment_processor',
266 'entity' => 'PaymentProcessor',
267 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
4c257e17 268 'localizable' => 1,
c3fc2621 269 'html' => [
1d2a585a 270 'type' => 'Text',
c3fc2621
CW
271 ],
272 ],
273 'description' => [
e501603b
TO
274 'name' => 'description',
275 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 276 'title' => ts('Processor Description'),
215b423e 277 'description' => ts('Payment Processor Description.'),
e501603b
TO
278 'maxlength' => 255,
279 'size' => CRM_Utils_Type::HUGE,
a36434b9 280 'where' => 'civicrm_payment_processor.description',
522a26c9 281 'table_name' => 'civicrm_payment_processor',
282 'entity' => 'PaymentProcessor',
283 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 284 'localizable' => 0,
83376469 285 'html' => [
286 'type' => 'Text',
287 ],
c3fc2621
CW
288 ],
289 'payment_processor_type_id' => [
e501603b
TO
290 'name' => 'payment_processor_type_id',
291 'type' => CRM_Utils_Type::T_INT,
c3fc2621 292 'title' => ts('Payment Processor Type ID'),
2f859d0a 293 'required' => TRUE,
a36434b9 294 'where' => 'civicrm_payment_processor.payment_processor_type_id',
522a26c9 295 'table_name' => 'civicrm_payment_processor',
296 'entity' => 'PaymentProcessor',
297 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 298 'localizable' => 0,
e501603b 299 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
c3fc2621 300 'pseudoconstant' => [
e501603b
TO
301 'table' => 'civicrm_payment_processor_type',
302 'keyColumn' => 'id',
303 'labelColumn' => 'title',
e6ca0a57 304 ],
c3fc2621
CW
305 ],
306 'is_active' => [
e501603b
TO
307 'name' => 'is_active',
308 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 309 'title' => ts('Processor is Active?'),
215b423e 310 'description' => ts('Is this processor active?'),
a36434b9 311 'where' => 'civicrm_payment_processor.is_active',
2f859d0a 312 'default' => '1',
522a26c9 313 'table_name' => 'civicrm_payment_processor',
314 'entity' => 'PaymentProcessor',
315 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 316 'localizable' => 0,
c3fc2621
CW
317 ],
318 'is_default' => [
e501603b
TO
319 'name' => 'is_default',
320 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 321 'title' => ts('Processor Is Default?'),
215b423e 322 'description' => ts('Is this processor the default?'),
a36434b9 323 'where' => 'civicrm_payment_processor.is_default',
2f859d0a 324 'default' => '0',
522a26c9 325 'table_name' => 'civicrm_payment_processor',
326 'entity' => 'PaymentProcessor',
327 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 328 'localizable' => 0,
c3fc2621
CW
329 ],
330 'is_test' => [
e501603b
TO
331 'name' => 'is_test',
332 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 333 'title' => ts('Is Test Processor?'),
215b423e 334 'description' => ts('Is this processor for a test site?'),
a36434b9 335 'where' => 'civicrm_payment_processor.is_test',
2f859d0a 336 'default' => '0',
522a26c9 337 'table_name' => 'civicrm_payment_processor',
338 'entity' => 'PaymentProcessor',
339 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 340 'localizable' => 0,
c3fc2621
CW
341 ],
342 'user_name' => [
e501603b
TO
343 'name' => 'user_name',
344 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 345 'title' => ts('User Name'),
e501603b
TO
346 'maxlength' => 255,
347 'size' => CRM_Utils_Type::HUGE,
a36434b9 348 'where' => 'civicrm_payment_processor.user_name',
522a26c9 349 'table_name' => 'civicrm_payment_processor',
350 'entity' => 'PaymentProcessor',
351 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 352 'localizable' => 0,
c3fc2621 353 'html' => [
1d2a585a 354 'type' => 'Text',
c3fc2621
CW
355 ],
356 ],
357 'password' => [
e501603b
TO
358 'name' => 'password',
359 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 360 'title' => ts('Password'),
e501603b
TO
361 'maxlength' => 255,
362 'size' => CRM_Utils_Type::HUGE,
a36434b9 363 'where' => 'civicrm_payment_processor.password',
522a26c9 364 'table_name' => 'civicrm_payment_processor',
365 'entity' => 'PaymentProcessor',
366 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 367 'localizable' => 0,
c3fc2621 368 'html' => [
dbb62458 369 'type' => 'Password',
c3fc2621
CW
370 ],
371 ],
372 'signature' => [
e501603b
TO
373 'name' => 'signature',
374 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 375 'title' => ts('Signature'),
1d2a585a 376 'rows' => 4,
377 'cols' => 40,
a36434b9 378 'where' => 'civicrm_payment_processor.signature',
522a26c9 379 'table_name' => 'civicrm_payment_processor',
380 'entity' => 'PaymentProcessor',
381 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 382 'localizable' => 0,
c3fc2621 383 'html' => [
1d2a585a 384 'type' => 'TextArea',
c3fc2621
CW
385 ],
386 ],
387 'url_site' => [
e501603b
TO
388 'name' => 'url_site',
389 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 390 'title' => ts('Site URL'),
e501603b
TO
391 'maxlength' => 255,
392 'size' => CRM_Utils_Type::HUGE,
a36434b9 393 'where' => 'civicrm_payment_processor.url_site',
522a26c9 394 'table_name' => 'civicrm_payment_processor',
395 'entity' => 'PaymentProcessor',
396 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 397 'localizable' => 0,
c3fc2621 398 'html' => [
1d2a585a 399 'type' => 'Text',
c3fc2621
CW
400 ],
401 ],
402 'url_api' => [
e501603b
TO
403 'name' => 'url_api',
404 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 405 'title' => ts('API URL'),
e501603b
TO
406 'maxlength' => 255,
407 'size' => CRM_Utils_Type::HUGE,
a36434b9 408 'where' => 'civicrm_payment_processor.url_api',
522a26c9 409 'table_name' => 'civicrm_payment_processor',
410 'entity' => 'PaymentProcessor',
411 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 412 'localizable' => 0,
c3fc2621 413 'html' => [
1d2a585a 414 'type' => 'Text',
c3fc2621
CW
415 ],
416 ],
417 'url_recur' => [
e501603b
TO
418 'name' => 'url_recur',
419 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 420 'title' => ts('Recurring Payments URL'),
e501603b
TO
421 'maxlength' => 255,
422 'size' => CRM_Utils_Type::HUGE,
a36434b9 423 'where' => 'civicrm_payment_processor.url_recur',
522a26c9 424 'table_name' => 'civicrm_payment_processor',
425 'entity' => 'PaymentProcessor',
426 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 427 'localizable' => 0,
c3fc2621 428 'html' => [
1d2a585a 429 'type' => 'Text',
c3fc2621
CW
430 ],
431 ],
432 'url_button' => [
e501603b
TO
433 'name' => 'url_button',
434 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 435 'title' => ts('Button URL'),
e501603b
TO
436 'maxlength' => 255,
437 'size' => CRM_Utils_Type::HUGE,
a36434b9 438 'where' => 'civicrm_payment_processor.url_button',
522a26c9 439 'table_name' => 'civicrm_payment_processor',
440 'entity' => 'PaymentProcessor',
441 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 442 'localizable' => 0,
c3fc2621 443 'html' => [
1d2a585a 444 'type' => 'Text',
c3fc2621
CW
445 ],
446 ],
447 'subject' => [
e501603b
TO
448 'name' => 'subject',
449 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 450 'title' => ts('Subject'),
e501603b
TO
451 'maxlength' => 255,
452 'size' => CRM_Utils_Type::HUGE,
a36434b9 453 'where' => 'civicrm_payment_processor.subject',
522a26c9 454 'table_name' => 'civicrm_payment_processor',
455 'entity' => 'PaymentProcessor',
456 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 457 'localizable' => 0,
c3fc2621 458 'html' => [
1d2a585a 459 'type' => 'Text',
c3fc2621
CW
460 ],
461 ],
462 'class_name' => [
e501603b
TO
463 'name' => 'class_name',
464 'type' => CRM_Utils_Type::T_STRING,
c3fc2621 465 'title' => ts('Suffix for PHP class name implementation'),
e501603b
TO
466 'maxlength' => 255,
467 'size' => CRM_Utils_Type::HUGE,
a36434b9 468 'where' => 'civicrm_payment_processor.class_name',
522a26c9 469 'table_name' => 'civicrm_payment_processor',
470 'entity' => 'PaymentProcessor',
471 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 472 'localizable' => 0,
c3fc2621
CW
473 ],
474 'billing_mode' => [
e501603b
TO
475 'name' => 'billing_mode',
476 'type' => CRM_Utils_Type::T_INT,
c3fc2621 477 'title' => ts('Processor Billing Mode'),
215b423e 478 'description' => ts('Billing Mode (deprecated)'),
c3fc2621 479 'required' => TRUE,
a36434b9 480 'where' => 'civicrm_payment_processor.billing_mode',
522a26c9 481 'table_name' => 'civicrm_payment_processor',
482 'entity' => 'PaymentProcessor',
483 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 484 'localizable' => 0,
c3fc2621
CW
485 ],
486 'is_recur' => [
e501603b
TO
487 'name' => 'is_recur',
488 'type' => CRM_Utils_Type::T_BOOLEAN,
c3fc2621 489 'title' => ts('Processor Supports Recurring?'),
215b423e 490 'description' => ts('Can process recurring contributions'),
a36434b9 491 'where' => 'civicrm_payment_processor.is_recur',
522a26c9 492 'table_name' => 'civicrm_payment_processor',
493 'entity' => 'PaymentProcessor',
494 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 495 'localizable' => 0,
c3fc2621
CW
496 ],
497 'payment_type' => [
e501603b
TO
498 'name' => 'payment_type',
499 'type' => CRM_Utils_Type::T_INT,
c3fc2621 500 'title' => ts('Payment Type'),
215b423e 501 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
a36434b9 502 'where' => 'civicrm_payment_processor.payment_type',
e501603b 503 'default' => '1',
522a26c9 504 'table_name' => 'civicrm_payment_processor',
505 'entity' => 'PaymentProcessor',
506 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 507 'localizable' => 0,
c3fc2621
CW
508 ],
509 'payment_instrument_id' => [
e501603b
TO
510 'name' => 'payment_instrument_id',
511 'type' => CRM_Utils_Type::T_INT,
c3fc2621 512 'title' => ts('Payment Method'),
215b423e 513 'description' => ts('Payment Instrument ID'),
a36434b9 514 'where' => 'civicrm_payment_processor.payment_instrument_id',
e501603b 515 'default' => '1',
522a26c9 516 'table_name' => 'civicrm_payment_processor',
517 'entity' => 'PaymentProcessor',
518 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 519 'localizable' => 0,
c3fc2621 520 'pseudoconstant' => [
e501603b
TO
521 'optionGroupName' => 'payment_instrument',
522 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
e6ca0a57 523 ],
c3fc2621
CW
524 ],
525 'accepted_credit_cards' => [
cb5962bd
SL
526 'name' => 'accepted_credit_cards',
527 'type' => CRM_Utils_Type::T_TEXT,
c3fc2621 528 'title' => ts('Accepted Credit Cards'),
215b423e 529 'description' => ts('array of accepted credit card types'),
a36434b9 530 'where' => 'civicrm_payment_processor.accepted_credit_cards',
cb5962bd 531 'default' => 'NULL',
522a26c9 532 'table_name' => 'civicrm_payment_processor',
533 'entity' => 'PaymentProcessor',
534 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
6a7e5e5d 535 'localizable' => 0,
2a5c9b4d 536 'serialize' => self::SERIALIZE_JSON,
c3fc2621
CW
537 ],
538 ];
346aaaba 539 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 540 }
346aaaba 541 return Civi::$statics[__CLASS__]['fields'];
e501603b 542 }
c3fc2621 543
e501603b 544 /**
bd8e0b14 545 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
546 *
547 * @return array
bd8e0b14 548 * Array(string $name => string $uniqueName).
e501603b 549 */
c3fc2621 550 public static function &fieldKeys() {
bd8e0b14
TO
551 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
552 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 553 }
bd8e0b14 554 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b 555 }
c3fc2621 556
e501603b
TO
557 /**
558 * Returns the names of this table
559 *
560 * @return string
561 */
c3fc2621 562 public static function getTableName() {
4c257e17 563 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
e501603b 564 }
c3fc2621 565
e501603b
TO
566 /**
567 * Returns if this table needs to be logged
568 *
c3fc2621 569 * @return bool
e501603b 570 */
c3fc2621 571 public function getLog() {
e501603b
TO
572 return self::$_log;
573 }
c3fc2621 574
e501603b
TO
575 /**
576 * Returns the list of fields that can be imported
577 *
578 * @param bool $prefix
579 *
580 * @return array
581 */
c3fc2621
CW
582 public static function &import($prefix = FALSE) {
583 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, []);
60808919 584 return $r;
e501603b 585 }
c3fc2621 586
e501603b
TO
587 /**
588 * Returns the list of fields that can be exported
589 *
590 * @param bool $prefix
591 *
592 * @return array
593 */
c3fc2621
CW
594 public static function &export($prefix = FALSE) {
595 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, []);
60808919 596 return $r;
e501603b 597 }
c3fc2621 598
e7a6b91a
AS
599 /**
600 * Returns the list of indices
c3fc2621
CW
601 *
602 * @param bool $localize
603 *
604 * @return array
e7a6b91a
AS
605 */
606 public static function indices($localize = TRUE) {
c3fc2621
CW
607 $indices = [
608 'UI_name_test_domain_id' => [
e7a6b91a 609 'name' => 'UI_name_test_domain_id',
c3fc2621 610 'field' => [
e7a6b91a
AS
611 0 => 'name',
612 1 => 'is_test',
613 2 => 'domain_id',
c3fc2621
CW
614 ],
615 'localizable' => FALSE,
616 'unique' => TRUE,
e7a6b91a 617 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
c3fc2621
CW
618 ],
619 ];
e7a6b91a
AS
620 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
621 }
c3fc2621 622
e501603b 623}