Commit | Line | Data |
---|---|---|
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/PaymentProcessorType.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
74db51d3 | 9 | * (GenCodeChecksum:65231e0b77bcce22bd505b89ace63506) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the PaymentProcessorType entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Financial_DAO_PaymentProcessorType 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_type'; |
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 Type ID | |
33 | * | |
e6ca0a57 | 34 | * @var int |
e501603b TO |
35 | */ |
36 | public $id; | |
c3fc2621 | 37 | |
e501603b TO |
38 | /** |
39 | * Payment Processor Name. | |
40 | * | |
41 | * @var string | |
42 | */ | |
43 | public $name; | |
c3fc2621 | 44 | |
e501603b TO |
45 | /** |
46 | * Payment Processor Name. | |
47 | * | |
48 | * @var string | |
49 | */ | |
50 | public $title; | |
c3fc2621 | 51 | |
e501603b TO |
52 | /** |
53 | * Payment Processor Description. | |
54 | * | |
55 | * @var string | |
56 | */ | |
57 | public $description; | |
c3fc2621 | 58 | |
e501603b TO |
59 | /** |
60 | * Is this processor active? | |
61 | * | |
e6ca0a57 | 62 | * @var bool |
e501603b TO |
63 | */ |
64 | public $is_active; | |
c3fc2621 | 65 | |
e501603b TO |
66 | /** |
67 | * Is this processor the default? | |
68 | * | |
e6ca0a57 | 69 | * @var bool |
e501603b TO |
70 | */ |
71 | public $is_default; | |
c3fc2621 | 72 | |
e501603b | 73 | /** |
e501603b TO |
74 | * @var string |
75 | */ | |
76 | public $user_name_label; | |
c3fc2621 | 77 | |
e501603b | 78 | /** |
e501603b TO |
79 | * @var string |
80 | */ | |
81 | public $password_label; | |
c3fc2621 | 82 | |
e501603b | 83 | /** |
e501603b TO |
84 | * @var string |
85 | */ | |
86 | public $signature_label; | |
c3fc2621 | 87 | |
e501603b | 88 | /** |
e501603b TO |
89 | * @var string |
90 | */ | |
91 | public $subject_label; | |
c3fc2621 | 92 | |
e501603b | 93 | /** |
e501603b TO |
94 | * @var string |
95 | */ | |
96 | public $class_name; | |
c3fc2621 | 97 | |
e501603b | 98 | /** |
e501603b TO |
99 | * @var string |
100 | */ | |
101 | public $url_site_default; | |
c3fc2621 | 102 | |
e501603b | 103 | /** |
e501603b TO |
104 | * @var string |
105 | */ | |
106 | public $url_api_default; | |
c3fc2621 | 107 | |
e501603b | 108 | /** |
e501603b TO |
109 | * @var string |
110 | */ | |
111 | public $url_recur_default; | |
c3fc2621 | 112 | |
e501603b | 113 | /** |
e501603b TO |
114 | * @var string |
115 | */ | |
116 | public $url_button_default; | |
c3fc2621 | 117 | |
e501603b | 118 | /** |
e501603b TO |
119 | * @var string |
120 | */ | |
121 | public $url_site_test_default; | |
c3fc2621 | 122 | |
e501603b | 123 | /** |
e501603b TO |
124 | * @var string |
125 | */ | |
126 | public $url_api_test_default; | |
c3fc2621 | 127 | |
e501603b | 128 | /** |
e501603b TO |
129 | * @var string |
130 | */ | |
131 | public $url_recur_test_default; | |
c3fc2621 | 132 | |
e501603b | 133 | /** |
e501603b TO |
134 | * @var string |
135 | */ | |
136 | public $url_button_test_default; | |
c3fc2621 | 137 | |
e501603b TO |
138 | /** |
139 | * Billing Mode (deprecated) | |
140 | * | |
e6ca0a57 | 141 | * @var int |
e501603b TO |
142 | */ |
143 | public $billing_mode; | |
c3fc2621 | 144 | |
e501603b TO |
145 | /** |
146 | * Can process recurring contributions | |
147 | * | |
e6ca0a57 | 148 | * @var bool |
e501603b TO |
149 | */ |
150 | public $is_recur; | |
c3fc2621 | 151 | |
e501603b TO |
152 | /** |
153 | * Payment Type: Credit or Debit (deprecated) | |
154 | * | |
e6ca0a57 | 155 | * @var int |
e501603b TO |
156 | */ |
157 | public $payment_type; | |
c3fc2621 | 158 | |
e501603b TO |
159 | /** |
160 | * Payment Instrument ID | |
161 | * | |
e6ca0a57 | 162 | * @var int |
e501603b TO |
163 | */ |
164 | public $payment_instrument_id; | |
c3fc2621 | 165 | |
e501603b | 166 | /** |
f41f0342 | 167 | * Class constructor. |
e501603b | 168 | */ |
c3fc2621 | 169 | public function __construct() { |
e501603b TO |
170 | $this->__table = 'civicrm_payment_processor_type'; |
171 | parent::__construct(); | |
172 | } | |
c3fc2621 | 173 | |
e501603b TO |
174 | /** |
175 | * Returns all the column names of this table | |
176 | * | |
177 | * @return array | |
178 | */ | |
c3fc2621 | 179 | public static function &fields() { |
346aaaba | 180 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
181 | Civi::$statics[__CLASS__]['fields'] = [ |
182 | 'id' => [ | |
e501603b TO |
183 | 'name' => 'id', |
184 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 185 | 'title' => ts('Payment Processor Type ID'), |
215b423e | 186 | 'description' => ts('Payment Processor Type ID'), |
c3fc2621 | 187 | 'required' => TRUE, |
a36434b9 | 188 | 'where' => 'civicrm_payment_processor_type.id', |
522a26c9 | 189 | 'table_name' => 'civicrm_payment_processor_type', |
190 | 'entity' => 'PaymentProcessorType', | |
191 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 192 | 'localizable' => 0, |
c3fc2621 CW |
193 | ], |
194 | 'name' => [ | |
e501603b TO |
195 | 'name' => 'name', |
196 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 197 | 'title' => ts('Payment Processor variable name to be used in code'), |
215b423e | 198 | 'description' => ts('Payment Processor Name.'), |
e501603b TO |
199 | 'maxlength' => 64, |
200 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 201 | 'where' => 'civicrm_payment_processor_type.name', |
522a26c9 | 202 | 'table_name' => 'civicrm_payment_processor_type', |
203 | 'entity' => 'PaymentProcessorType', | |
204 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 205 | 'localizable' => 0, |
c3fc2621 CW |
206 | ], |
207 | 'title' => [ | |
e501603b TO |
208 | 'name' => 'title', |
209 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 210 | 'title' => ts('Payment Processor Title'), |
215b423e | 211 | 'description' => ts('Payment Processor Name.'), |
e501603b TO |
212 | 'maxlength' => 127, |
213 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 214 | 'where' => 'civicrm_payment_processor_type.title', |
522a26c9 | 215 | 'table_name' => 'civicrm_payment_processor_type', |
216 | 'entity' => 'PaymentProcessorType', | |
217 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 218 | 'localizable' => 0, |
c3fc2621 CW |
219 | ], |
220 | 'description' => [ | |
e501603b TO |
221 | 'name' => 'description', |
222 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 223 | 'title' => ts('Processor Type Description'), |
215b423e | 224 | 'description' => ts('Payment Processor Description.'), |
e501603b TO |
225 | 'maxlength' => 255, |
226 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 227 | 'where' => 'civicrm_payment_processor_type.description', |
522a26c9 | 228 | 'table_name' => 'civicrm_payment_processor_type', |
229 | 'entity' => 'PaymentProcessorType', | |
230 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 231 | 'localizable' => 0, |
c3fc2621 CW |
232 | ], |
233 | 'is_active' => [ | |
e501603b TO |
234 | 'name' => 'is_active', |
235 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 236 | 'title' => ts('Processor Type Is Active?'), |
215b423e | 237 | 'description' => ts('Is this processor active?'), |
a36434b9 | 238 | 'where' => 'civicrm_payment_processor_type.is_active', |
522a26c9 | 239 | 'table_name' => 'civicrm_payment_processor_type', |
240 | 'entity' => 'PaymentProcessorType', | |
241 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 242 | 'localizable' => 0, |
c3fc2621 CW |
243 | ], |
244 | 'is_default' => [ | |
e501603b TO |
245 | 'name' => 'is_default', |
246 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 247 | 'title' => ts('Processor Type is Default?'), |
215b423e | 248 | 'description' => ts('Is this processor the default?'), |
a36434b9 | 249 | 'where' => 'civicrm_payment_processor_type.is_default', |
522a26c9 | 250 | 'table_name' => 'civicrm_payment_processor_type', |
251 | 'entity' => 'PaymentProcessorType', | |
252 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 253 | 'localizable' => 0, |
c3fc2621 CW |
254 | ], |
255 | 'user_name_label' => [ | |
e501603b TO |
256 | 'name' => 'user_name_label', |
257 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 258 | 'title' => ts('Label for User Name if used'), |
e501603b TO |
259 | 'maxlength' => 255, |
260 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 261 | 'where' => 'civicrm_payment_processor_type.user_name_label', |
522a26c9 | 262 | 'table_name' => 'civicrm_payment_processor_type', |
263 | 'entity' => 'PaymentProcessorType', | |
264 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 265 | 'localizable' => 0, |
c3fc2621 CW |
266 | ], |
267 | 'password_label' => [ | |
e501603b TO |
268 | 'name' => 'password_label', |
269 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 270 | 'title' => ts('Label for password'), |
e501603b TO |
271 | 'maxlength' => 255, |
272 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 273 | 'where' => 'civicrm_payment_processor_type.password_label', |
522a26c9 | 274 | 'table_name' => 'civicrm_payment_processor_type', |
275 | 'entity' => 'PaymentProcessorType', | |
276 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 277 | 'localizable' => 0, |
c3fc2621 CW |
278 | ], |
279 | 'signature_label' => [ | |
e501603b TO |
280 | 'name' => 'signature_label', |
281 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 282 | 'title' => ts('Label for Signature'), |
e501603b TO |
283 | 'maxlength' => 255, |
284 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 285 | 'where' => 'civicrm_payment_processor_type.signature_label', |
522a26c9 | 286 | 'table_name' => 'civicrm_payment_processor_type', |
287 | 'entity' => 'PaymentProcessorType', | |
288 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 289 | 'localizable' => 0, |
c3fc2621 CW |
290 | ], |
291 | 'subject_label' => [ | |
e501603b TO |
292 | 'name' => 'subject_label', |
293 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 294 | 'title' => ts('Label for Subject'), |
e501603b TO |
295 | 'maxlength' => 255, |
296 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 297 | 'where' => 'civicrm_payment_processor_type.subject_label', |
522a26c9 | 298 | 'table_name' => 'civicrm_payment_processor_type', |
299 | 'entity' => 'PaymentProcessorType', | |
300 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 301 | 'localizable' => 0, |
c3fc2621 CW |
302 | ], |
303 | 'class_name' => [ | |
e501603b TO |
304 | 'name' => 'class_name', |
305 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 306 | 'title' => ts('Suffix for PHP class name implementation'), |
e501603b TO |
307 | 'maxlength' => 255, |
308 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 309 | 'where' => 'civicrm_payment_processor_type.class_name', |
522a26c9 | 310 | 'table_name' => 'civicrm_payment_processor_type', |
311 | 'entity' => 'PaymentProcessorType', | |
312 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 313 | 'localizable' => 0, |
c3fc2621 CW |
314 | ], |
315 | 'url_site_default' => [ | |
e501603b TO |
316 | 'name' => 'url_site_default', |
317 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 318 | 'title' => ts('Default Live Site URL'), |
e501603b TO |
319 | 'maxlength' => 255, |
320 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 321 | 'where' => 'civicrm_payment_processor_type.url_site_default', |
522a26c9 | 322 | 'table_name' => 'civicrm_payment_processor_type', |
323 | 'entity' => 'PaymentProcessorType', | |
324 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 325 | 'localizable' => 0, |
c3fc2621 CW |
326 | ], |
327 | 'url_api_default' => [ | |
e501603b TO |
328 | 'name' => 'url_api_default', |
329 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 330 | 'title' => ts('Default API Site URL'), |
e501603b TO |
331 | 'maxlength' => 255, |
332 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 333 | 'where' => 'civicrm_payment_processor_type.url_api_default', |
522a26c9 | 334 | 'table_name' => 'civicrm_payment_processor_type', |
335 | 'entity' => 'PaymentProcessorType', | |
336 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 337 | 'localizable' => 0, |
c3fc2621 CW |
338 | ], |
339 | 'url_recur_default' => [ | |
e501603b TO |
340 | 'name' => 'url_recur_default', |
341 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 342 | 'title' => ts('Default Live Recurring Payments URL'), |
e501603b TO |
343 | 'maxlength' => 255, |
344 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 345 | 'where' => 'civicrm_payment_processor_type.url_recur_default', |
522a26c9 | 346 | 'table_name' => 'civicrm_payment_processor_type', |
347 | 'entity' => 'PaymentProcessorType', | |
348 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 349 | 'localizable' => 0, |
c3fc2621 CW |
350 | ], |
351 | 'url_button_default' => [ | |
e501603b TO |
352 | 'name' => 'url_button_default', |
353 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 354 | 'title' => ts('Default Live Button URL'), |
e501603b TO |
355 | 'maxlength' => 255, |
356 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 357 | 'where' => 'civicrm_payment_processor_type.url_button_default', |
522a26c9 | 358 | 'table_name' => 'civicrm_payment_processor_type', |
359 | 'entity' => 'PaymentProcessorType', | |
360 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 361 | 'localizable' => 0, |
c3fc2621 CW |
362 | ], |
363 | 'url_site_test_default' => [ | |
e501603b TO |
364 | 'name' => 'url_site_test_default', |
365 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 366 | 'title' => ts('Default Test Site URL'), |
e501603b TO |
367 | 'maxlength' => 255, |
368 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 369 | 'where' => 'civicrm_payment_processor_type.url_site_test_default', |
522a26c9 | 370 | 'table_name' => 'civicrm_payment_processor_type', |
371 | 'entity' => 'PaymentProcessorType', | |
372 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 373 | 'localizable' => 0, |
c3fc2621 CW |
374 | ], |
375 | 'url_api_test_default' => [ | |
e501603b TO |
376 | 'name' => 'url_api_test_default', |
377 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 378 | 'title' => ts('Default Test API URL'), |
e501603b TO |
379 | 'maxlength' => 255, |
380 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 381 | 'where' => 'civicrm_payment_processor_type.url_api_test_default', |
522a26c9 | 382 | 'table_name' => 'civicrm_payment_processor_type', |
383 | 'entity' => 'PaymentProcessorType', | |
384 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 385 | 'localizable' => 0, |
c3fc2621 CW |
386 | ], |
387 | 'url_recur_test_default' => [ | |
e501603b TO |
388 | 'name' => 'url_recur_test_default', |
389 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 390 | 'title' => ts('Default Test Recurring Payment URL'), |
e501603b TO |
391 | 'maxlength' => 255, |
392 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 393 | 'where' => 'civicrm_payment_processor_type.url_recur_test_default', |
522a26c9 | 394 | 'table_name' => 'civicrm_payment_processor_type', |
395 | 'entity' => 'PaymentProcessorType', | |
396 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 397 | 'localizable' => 0, |
c3fc2621 CW |
398 | ], |
399 | 'url_button_test_default' => [ | |
e501603b TO |
400 | 'name' => 'url_button_test_default', |
401 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 402 | 'title' => ts('Default Test Button URL'), |
e501603b TO |
403 | 'maxlength' => 255, |
404 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 405 | 'where' => 'civicrm_payment_processor_type.url_button_test_default', |
522a26c9 | 406 | 'table_name' => 'civicrm_payment_processor_type', |
407 | 'entity' => 'PaymentProcessorType', | |
408 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 409 | 'localizable' => 0, |
c3fc2621 CW |
410 | ], |
411 | 'billing_mode' => [ | |
e501603b TO |
412 | 'name' => 'billing_mode', |
413 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 414 | 'title' => ts('Billing Mode'), |
215b423e | 415 | 'description' => ts('Billing Mode (deprecated)'), |
c3fc2621 | 416 | 'required' => TRUE, |
a36434b9 | 417 | 'where' => 'civicrm_payment_processor_type.billing_mode', |
522a26c9 | 418 | 'table_name' => 'civicrm_payment_processor_type', |
419 | 'entity' => 'PaymentProcessorType', | |
420 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 421 | 'localizable' => 0, |
c3fc2621 | 422 | 'html' => [ |
e501603b | 423 | 'type' => 'Select', |
c3fc2621 CW |
424 | ], |
425 | 'pseudoconstant' => [ | |
e501603b | 426 | 'callback' => 'CRM_Core_SelectValues::billingMode', |
e6ca0a57 | 427 | ], |
c3fc2621 CW |
428 | ], |
429 | 'is_recur' => [ | |
e501603b TO |
430 | 'name' => 'is_recur', |
431 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 432 | 'title' => ts('Processor Type Supports Recurring?'), |
215b423e | 433 | 'description' => ts('Can process recurring contributions'), |
a36434b9 | 434 | 'where' => 'civicrm_payment_processor_type.is_recur', |
522a26c9 | 435 | 'table_name' => 'civicrm_payment_processor_type', |
436 | 'entity' => 'PaymentProcessorType', | |
437 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 438 | 'localizable' => 0, |
c3fc2621 CW |
439 | ], |
440 | 'payment_type' => [ | |
e501603b TO |
441 | 'name' => 'payment_type', |
442 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 443 | 'title' => ts('Processor Type Payment Type'), |
215b423e | 444 | 'description' => ts('Payment Type: Credit or Debit (deprecated)'), |
a36434b9 | 445 | 'where' => 'civicrm_payment_processor_type.payment_type', |
e501603b | 446 | 'default' => '1', |
522a26c9 | 447 | 'table_name' => 'civicrm_payment_processor_type', |
448 | 'entity' => 'PaymentProcessorType', | |
449 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 450 | 'localizable' => 0, |
c3fc2621 CW |
451 | ], |
452 | 'payment_instrument_id' => [ | |
e501603b TO |
453 | 'name' => 'payment_instrument_id', |
454 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 455 | 'title' => ts('Payment Method'), |
215b423e | 456 | 'description' => ts('Payment Instrument ID'), |
a36434b9 | 457 | 'where' => 'civicrm_payment_processor_type.payment_instrument_id', |
e501603b | 458 | 'default' => '1', |
522a26c9 | 459 | 'table_name' => 'civicrm_payment_processor_type', |
460 | 'entity' => 'PaymentProcessorType', | |
461 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 462 | 'localizable' => 0, |
c3fc2621 | 463 | 'pseudoconstant' => [ |
e501603b TO |
464 | 'optionGroupName' => 'payment_instrument', |
465 | 'optionEditPath' => 'civicrm/admin/options/payment_instrument', | |
e6ca0a57 | 466 | ], |
c3fc2621 CW |
467 | ], |
468 | ]; | |
346aaaba | 469 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 470 | } |
346aaaba | 471 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 472 | } |
c3fc2621 | 473 | |
e501603b | 474 | /** |
bd8e0b14 | 475 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
476 | * |
477 | * @return array | |
bd8e0b14 | 478 | * Array(string $name => string $uniqueName). |
e501603b | 479 | */ |
c3fc2621 | 480 | public static function &fieldKeys() { |
bd8e0b14 TO |
481 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
482 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 483 | } |
bd8e0b14 | 484 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 485 | } |
c3fc2621 | 486 | |
e501603b TO |
487 | /** |
488 | * Returns the names of this table | |
489 | * | |
490 | * @return string | |
491 | */ | |
c3fc2621 | 492 | public static function getTableName() { |
e501603b TO |
493 | return self::$_tableName; |
494 | } | |
c3fc2621 | 495 | |
e501603b TO |
496 | /** |
497 | * Returns if this table needs to be logged | |
498 | * | |
c3fc2621 | 499 | * @return bool |
e501603b | 500 | */ |
c3fc2621 | 501 | public function getLog() { |
e501603b TO |
502 | return self::$_log; |
503 | } | |
c3fc2621 | 504 | |
e501603b TO |
505 | /** |
506 | * Returns the list of fields that can be imported | |
507 | * | |
508 | * @param bool $prefix | |
509 | * | |
510 | * @return array | |
511 | */ | |
c3fc2621 CW |
512 | public static function &import($prefix = FALSE) { |
513 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor_type', $prefix, []); | |
60808919 | 514 | return $r; |
e501603b | 515 | } |
c3fc2621 | 516 | |
e501603b TO |
517 | /** |
518 | * Returns the list of fields that can be exported | |
519 | * | |
520 | * @param bool $prefix | |
521 | * | |
522 | * @return array | |
523 | */ | |
c3fc2621 CW |
524 | public static function &export($prefix = FALSE) { |
525 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor_type', $prefix, []); | |
60808919 | 526 | return $r; |
e501603b | 527 | } |
c3fc2621 | 528 | |
e7a6b91a AS |
529 | /** |
530 | * Returns the list of indices | |
c3fc2621 CW |
531 | * |
532 | * @param bool $localize | |
533 | * | |
534 | * @return array | |
e7a6b91a AS |
535 | */ |
536 | public static function indices($localize = TRUE) { | |
c3fc2621 CW |
537 | $indices = [ |
538 | 'UI_name' => [ | |
e7a6b91a | 539 | 'name' => 'UI_name', |
c3fc2621 | 540 | 'field' => [ |
e7a6b91a | 541 | 0 => 'name', |
c3fc2621 CW |
542 | ], |
543 | 'localizable' => FALSE, | |
544 | 'unique' => TRUE, | |
e7a6b91a | 545 | 'sig' => 'civicrm_payment_processor_type::1::name', |
c3fc2621 CW |
546 | ], |
547 | ]; | |
e7a6b91a AS |
548 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
549 | } | |
c3fc2621 | 550 | |
e501603b | 551 | } |