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/Financial/PaymentProcessorType.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
9c992885 | 9 | * (GenCodeChecksum:1133a3c9eb58738c315a8509fea39d72) |
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 | 38 | /** |
9c992885 | 39 | * Payment Processor Type Name. |
e501603b TO |
40 | * |
41 | * @var string | |
42 | */ | |
43 | public $name; | |
c3fc2621 | 44 | |
e501603b | 45 | /** |
2f859d0a | 46 | * Payment Processor Type Title. |
e501603b TO |
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, | |
9c992885 SL |
197 | 'title' => ts('Payment Processor Type variable name to be used in code'), |
198 | 'description' => ts('Payment Processor Type Name.'), | |
2f859d0a | 199 | 'required' => TRUE, |
e501603b TO |
200 | 'maxlength' => 64, |
201 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 202 | 'where' => 'civicrm_payment_processor_type.name', |
522a26c9 | 203 | 'table_name' => 'civicrm_payment_processor_type', |
204 | 'entity' => 'PaymentProcessorType', | |
205 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 206 | 'localizable' => 0, |
c3fc2621 CW |
207 | ], |
208 | 'title' => [ | |
e501603b TO |
209 | 'name' => 'title', |
210 | 'type' => CRM_Utils_Type::T_STRING, | |
2f859d0a SL |
211 | 'title' => ts('Payment Processor Type Title'), |
212 | 'description' => ts('Payment Processor Type Title.'), | |
213 | 'required' => TRUE, | |
e501603b TO |
214 | 'maxlength' => 127, |
215 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 216 | 'where' => 'civicrm_payment_processor_type.title', |
522a26c9 | 217 | 'table_name' => 'civicrm_payment_processor_type', |
218 | 'entity' => 'PaymentProcessorType', | |
219 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 220 | 'localizable' => 0, |
c3fc2621 CW |
221 | ], |
222 | 'description' => [ | |
e501603b TO |
223 | 'name' => 'description', |
224 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 225 | 'title' => ts('Processor Type Description'), |
215b423e | 226 | 'description' => ts('Payment Processor Description.'), |
e501603b TO |
227 | 'maxlength' => 255, |
228 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 229 | 'where' => 'civicrm_payment_processor_type.description', |
522a26c9 | 230 | 'table_name' => 'civicrm_payment_processor_type', |
231 | 'entity' => 'PaymentProcessorType', | |
232 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 233 | 'localizable' => 0, |
c3fc2621 CW |
234 | ], |
235 | 'is_active' => [ | |
e501603b TO |
236 | 'name' => 'is_active', |
237 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 238 | 'title' => ts('Processor Type Is Active?'), |
215b423e | 239 | 'description' => ts('Is this processor active?'), |
a36434b9 | 240 | 'where' => 'civicrm_payment_processor_type.is_active', |
2f859d0a | 241 | 'default' => '1', |
522a26c9 | 242 | 'table_name' => 'civicrm_payment_processor_type', |
243 | 'entity' => 'PaymentProcessorType', | |
244 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 245 | 'localizable' => 0, |
c3fc2621 CW |
246 | ], |
247 | 'is_default' => [ | |
e501603b TO |
248 | 'name' => 'is_default', |
249 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 250 | 'title' => ts('Processor Type is Default?'), |
215b423e | 251 | 'description' => ts('Is this processor the default?'), |
a36434b9 | 252 | 'where' => 'civicrm_payment_processor_type.is_default', |
2f859d0a | 253 | 'default' => '0', |
522a26c9 | 254 | 'table_name' => 'civicrm_payment_processor_type', |
255 | 'entity' => 'PaymentProcessorType', | |
256 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 257 | 'localizable' => 0, |
c3fc2621 CW |
258 | ], |
259 | 'user_name_label' => [ | |
e501603b TO |
260 | 'name' => 'user_name_label', |
261 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 262 | 'title' => ts('Label for User Name if used'), |
e501603b TO |
263 | 'maxlength' => 255, |
264 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 265 | 'where' => 'civicrm_payment_processor_type.user_name_label', |
522a26c9 | 266 | 'table_name' => 'civicrm_payment_processor_type', |
267 | 'entity' => 'PaymentProcessorType', | |
268 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 269 | 'localizable' => 0, |
c3fc2621 CW |
270 | ], |
271 | 'password_label' => [ | |
e501603b TO |
272 | 'name' => 'password_label', |
273 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 274 | 'title' => ts('Label for password'), |
e501603b TO |
275 | 'maxlength' => 255, |
276 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 277 | 'where' => 'civicrm_payment_processor_type.password_label', |
522a26c9 | 278 | 'table_name' => 'civicrm_payment_processor_type', |
279 | 'entity' => 'PaymentProcessorType', | |
280 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 281 | 'localizable' => 0, |
c3fc2621 CW |
282 | ], |
283 | 'signature_label' => [ | |
e501603b TO |
284 | 'name' => 'signature_label', |
285 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 286 | 'title' => ts('Label for Signature'), |
e501603b TO |
287 | 'maxlength' => 255, |
288 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 289 | 'where' => 'civicrm_payment_processor_type.signature_label', |
522a26c9 | 290 | 'table_name' => 'civicrm_payment_processor_type', |
291 | 'entity' => 'PaymentProcessorType', | |
292 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 293 | 'localizable' => 0, |
c3fc2621 CW |
294 | ], |
295 | 'subject_label' => [ | |
e501603b TO |
296 | 'name' => 'subject_label', |
297 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 298 | 'title' => ts('Label for Subject'), |
e501603b TO |
299 | 'maxlength' => 255, |
300 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 301 | 'where' => 'civicrm_payment_processor_type.subject_label', |
522a26c9 | 302 | 'table_name' => 'civicrm_payment_processor_type', |
303 | 'entity' => 'PaymentProcessorType', | |
304 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 305 | 'localizable' => 0, |
c3fc2621 CW |
306 | ], |
307 | 'class_name' => [ | |
e501603b TO |
308 | 'name' => 'class_name', |
309 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 310 | 'title' => ts('Suffix for PHP class name implementation'), |
2f859d0a | 311 | 'required' => TRUE, |
e501603b TO |
312 | 'maxlength' => 255, |
313 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 314 | 'where' => 'civicrm_payment_processor_type.class_name', |
522a26c9 | 315 | 'table_name' => 'civicrm_payment_processor_type', |
316 | 'entity' => 'PaymentProcessorType', | |
317 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 318 | 'localizable' => 0, |
c3fc2621 CW |
319 | ], |
320 | 'url_site_default' => [ | |
e501603b TO |
321 | 'name' => 'url_site_default', |
322 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 323 | 'title' => ts('Default Live Site URL'), |
e501603b TO |
324 | 'maxlength' => 255, |
325 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 326 | 'where' => 'civicrm_payment_processor_type.url_site_default', |
522a26c9 | 327 | 'table_name' => 'civicrm_payment_processor_type', |
328 | 'entity' => 'PaymentProcessorType', | |
329 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 330 | 'localizable' => 0, |
c3fc2621 CW |
331 | ], |
332 | 'url_api_default' => [ | |
e501603b TO |
333 | 'name' => 'url_api_default', |
334 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 335 | 'title' => ts('Default API Site URL'), |
e501603b TO |
336 | 'maxlength' => 255, |
337 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 338 | 'where' => 'civicrm_payment_processor_type.url_api_default', |
522a26c9 | 339 | 'table_name' => 'civicrm_payment_processor_type', |
340 | 'entity' => 'PaymentProcessorType', | |
341 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 342 | 'localizable' => 0, |
c3fc2621 CW |
343 | ], |
344 | 'url_recur_default' => [ | |
e501603b TO |
345 | 'name' => 'url_recur_default', |
346 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 347 | 'title' => ts('Default Live Recurring Payments URL'), |
e501603b TO |
348 | 'maxlength' => 255, |
349 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 350 | 'where' => 'civicrm_payment_processor_type.url_recur_default', |
522a26c9 | 351 | 'table_name' => 'civicrm_payment_processor_type', |
352 | 'entity' => 'PaymentProcessorType', | |
353 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 354 | 'localizable' => 0, |
c3fc2621 CW |
355 | ], |
356 | 'url_button_default' => [ | |
e501603b TO |
357 | 'name' => 'url_button_default', |
358 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 359 | 'title' => ts('Default Live Button URL'), |
e501603b TO |
360 | 'maxlength' => 255, |
361 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 362 | 'where' => 'civicrm_payment_processor_type.url_button_default', |
522a26c9 | 363 | 'table_name' => 'civicrm_payment_processor_type', |
364 | 'entity' => 'PaymentProcessorType', | |
365 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 366 | 'localizable' => 0, |
c3fc2621 CW |
367 | ], |
368 | 'url_site_test_default' => [ | |
e501603b TO |
369 | 'name' => 'url_site_test_default', |
370 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 371 | 'title' => ts('Default Test Site URL'), |
e501603b TO |
372 | 'maxlength' => 255, |
373 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 374 | 'where' => 'civicrm_payment_processor_type.url_site_test_default', |
522a26c9 | 375 | 'table_name' => 'civicrm_payment_processor_type', |
376 | 'entity' => 'PaymentProcessorType', | |
377 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 378 | 'localizable' => 0, |
c3fc2621 CW |
379 | ], |
380 | 'url_api_test_default' => [ | |
e501603b TO |
381 | 'name' => 'url_api_test_default', |
382 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 383 | 'title' => ts('Default Test API URL'), |
e501603b TO |
384 | 'maxlength' => 255, |
385 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 386 | 'where' => 'civicrm_payment_processor_type.url_api_test_default', |
522a26c9 | 387 | 'table_name' => 'civicrm_payment_processor_type', |
388 | 'entity' => 'PaymentProcessorType', | |
389 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 390 | 'localizable' => 0, |
c3fc2621 CW |
391 | ], |
392 | 'url_recur_test_default' => [ | |
e501603b TO |
393 | 'name' => 'url_recur_test_default', |
394 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 395 | 'title' => ts('Default Test Recurring Payment URL'), |
e501603b TO |
396 | 'maxlength' => 255, |
397 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 398 | 'where' => 'civicrm_payment_processor_type.url_recur_test_default', |
522a26c9 | 399 | 'table_name' => 'civicrm_payment_processor_type', |
400 | 'entity' => 'PaymentProcessorType', | |
401 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 402 | 'localizable' => 0, |
c3fc2621 CW |
403 | ], |
404 | 'url_button_test_default' => [ | |
e501603b TO |
405 | 'name' => 'url_button_test_default', |
406 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 407 | 'title' => ts('Default Test Button URL'), |
e501603b TO |
408 | 'maxlength' => 255, |
409 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 410 | 'where' => 'civicrm_payment_processor_type.url_button_test_default', |
522a26c9 | 411 | 'table_name' => 'civicrm_payment_processor_type', |
412 | 'entity' => 'PaymentProcessorType', | |
413 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 414 | 'localizable' => 0, |
c3fc2621 CW |
415 | ], |
416 | 'billing_mode' => [ | |
e501603b TO |
417 | 'name' => 'billing_mode', |
418 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 419 | 'title' => ts('Billing Mode'), |
215b423e | 420 | 'description' => ts('Billing Mode (deprecated)'), |
c3fc2621 | 421 | 'required' => TRUE, |
a36434b9 | 422 | 'where' => 'civicrm_payment_processor_type.billing_mode', |
522a26c9 | 423 | 'table_name' => 'civicrm_payment_processor_type', |
424 | 'entity' => 'PaymentProcessorType', | |
425 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 426 | 'localizable' => 0, |
c3fc2621 | 427 | 'html' => [ |
e501603b | 428 | 'type' => 'Select', |
c3fc2621 CW |
429 | ], |
430 | 'pseudoconstant' => [ | |
e501603b | 431 | 'callback' => 'CRM_Core_SelectValues::billingMode', |
e6ca0a57 | 432 | ], |
c3fc2621 CW |
433 | ], |
434 | 'is_recur' => [ | |
e501603b TO |
435 | 'name' => 'is_recur', |
436 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 437 | 'title' => ts('Processor Type Supports Recurring?'), |
215b423e | 438 | 'description' => ts('Can process recurring contributions'), |
a36434b9 | 439 | 'where' => 'civicrm_payment_processor_type.is_recur', |
522a26c9 | 440 | 'table_name' => 'civicrm_payment_processor_type', |
441 | 'entity' => 'PaymentProcessorType', | |
442 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 443 | 'localizable' => 0, |
c3fc2621 CW |
444 | ], |
445 | 'payment_type' => [ | |
e501603b TO |
446 | 'name' => 'payment_type', |
447 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 448 | 'title' => ts('Processor Type Payment Type'), |
215b423e | 449 | 'description' => ts('Payment Type: Credit or Debit (deprecated)'), |
a36434b9 | 450 | 'where' => 'civicrm_payment_processor_type.payment_type', |
e501603b | 451 | 'default' => '1', |
522a26c9 | 452 | 'table_name' => 'civicrm_payment_processor_type', |
453 | 'entity' => 'PaymentProcessorType', | |
454 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 455 | 'localizable' => 0, |
c3fc2621 CW |
456 | ], |
457 | 'payment_instrument_id' => [ | |
e501603b TO |
458 | 'name' => 'payment_instrument_id', |
459 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 460 | 'title' => ts('Payment Method'), |
215b423e | 461 | 'description' => ts('Payment Instrument ID'), |
a36434b9 | 462 | 'where' => 'civicrm_payment_processor_type.payment_instrument_id', |
e501603b | 463 | 'default' => '1', |
522a26c9 | 464 | 'table_name' => 'civicrm_payment_processor_type', |
465 | 'entity' => 'PaymentProcessorType', | |
466 | 'bao' => 'CRM_Financial_BAO_PaymentProcessorType', | |
6a7e5e5d | 467 | 'localizable' => 0, |
c3fc2621 | 468 | 'pseudoconstant' => [ |
e501603b TO |
469 | 'optionGroupName' => 'payment_instrument', |
470 | 'optionEditPath' => 'civicrm/admin/options/payment_instrument', | |
e6ca0a57 | 471 | ], |
c3fc2621 CW |
472 | ], |
473 | ]; | |
346aaaba | 474 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 475 | } |
346aaaba | 476 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 477 | } |
c3fc2621 | 478 | |
e501603b | 479 | /** |
bd8e0b14 | 480 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
481 | * |
482 | * @return array | |
bd8e0b14 | 483 | * Array(string $name => string $uniqueName). |
e501603b | 484 | */ |
c3fc2621 | 485 | public static function &fieldKeys() { |
bd8e0b14 TO |
486 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
487 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 488 | } |
bd8e0b14 | 489 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 490 | } |
c3fc2621 | 491 | |
e501603b TO |
492 | /** |
493 | * Returns the names of this table | |
494 | * | |
495 | * @return string | |
496 | */ | |
c3fc2621 | 497 | public static function getTableName() { |
e501603b TO |
498 | return self::$_tableName; |
499 | } | |
c3fc2621 | 500 | |
e501603b TO |
501 | /** |
502 | * Returns if this table needs to be logged | |
503 | * | |
c3fc2621 | 504 | * @return bool |
e501603b | 505 | */ |
c3fc2621 | 506 | public function getLog() { |
e501603b TO |
507 | return self::$_log; |
508 | } | |
c3fc2621 | 509 | |
e501603b TO |
510 | /** |
511 | * Returns the list of fields that can be imported | |
512 | * | |
513 | * @param bool $prefix | |
514 | * | |
515 | * @return array | |
516 | */ | |
c3fc2621 CW |
517 | public static function &import($prefix = FALSE) { |
518 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor_type', $prefix, []); | |
60808919 | 519 | return $r; |
e501603b | 520 | } |
c3fc2621 | 521 | |
e501603b TO |
522 | /** |
523 | * Returns the list of fields that can be exported | |
524 | * | |
525 | * @param bool $prefix | |
526 | * | |
527 | * @return array | |
528 | */ | |
c3fc2621 CW |
529 | public static function &export($prefix = FALSE) { |
530 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor_type', $prefix, []); | |
60808919 | 531 | return $r; |
e501603b | 532 | } |
c3fc2621 | 533 | |
e7a6b91a AS |
534 | /** |
535 | * Returns the list of indices | |
c3fc2621 CW |
536 | * |
537 | * @param bool $localize | |
538 | * | |
539 | * @return array | |
e7a6b91a AS |
540 | */ |
541 | public static function indices($localize = TRUE) { | |
c3fc2621 CW |
542 | $indices = [ |
543 | 'UI_name' => [ | |
e7a6b91a | 544 | 'name' => 'UI_name', |
c3fc2621 | 545 | 'field' => [ |
e7a6b91a | 546 | 0 => 'name', |
c3fc2621 CW |
547 | ], |
548 | 'localizable' => FALSE, | |
549 | 'unique' => TRUE, | |
e7a6b91a | 550 | 'sig' => 'civicrm_payment_processor_type::1::name', |
c3fc2621 CW |
551 | ], |
552 | ]; | |
e7a6b91a AS |
553 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
554 | } | |
c3fc2621 | 555 | |
e501603b | 556 | } |