Merge pull request #9869 from omarabuhussein/CRM-20140-fix-alterMailParams-hook
[civicrm-core.git] / CRM / Financial / DAO / PaymentProcessorType.php
CommitLineData
e501603b
TO
1<?php
2/*
3+--------------------------------------------------------------------+
4| CiviCRM version 4.7 |
5+--------------------------------------------------------------------+
0f03f337 6| Copyright CiviCRM LLC (c) 2004-2017 |
e501603b
TO
7+--------------------------------------------------------------------+
8| This file is a part of CiviCRM. |
9| |
10| CiviCRM is free software; you can copy, modify, and distribute it |
11| under the terms of the GNU Affero General Public License |
12| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13| |
14| CiviCRM is distributed in the hope that it will be useful, but |
15| WITHOUT ANY WARRANTY; without even the implied warranty of |
16| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17| See the GNU Affero General Public License for more details. |
18| |
19| You should have received a copy of the GNU Affero General Public |
20| License and the CiviCRM Licensing Exception along |
21| with this program; if not, contact CiviCRM LLC |
22| at info[AT]civicrm[DOT]org. If you have questions about the |
23| GNU Affero General Public License or the licensing of CiviCRM, |
24| see the CiviCRM license FAQ at http://civicrm.org/licensing |
25+--------------------------------------------------------------------+
26*/
27/**
28 * @package CRM
0f03f337 29 * @copyright CiviCRM LLC (c) 2004-2017
e501603b
TO
30 *
31 * Generated from xml/schema/CRM/Financial/PaymentProcessorType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
522a26c9 33 * (GenCodeChecksum:39cdf5f44260a922c605275692b91f07)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
f41f0342 37/**
38 * CRM_Financial_DAO_PaymentProcessorType constructor.
39 */
e501603b
TO
40class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO {
41 /**
f41f0342 42 * Static instance to hold the table name.
e501603b
TO
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_payment_processor_type';
e501603b 47 /**
f41f0342 48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b
TO
49 *
50 * @var boolean
51 */
52 static $_log = false;
53 /**
54 * Payment Processor Type ID
55 *
56 * @var int unsigned
57 */
58 public $id;
59 /**
60 * Payment Processor Name.
61 *
62 * @var string
63 */
64 public $name;
65 /**
66 * Payment Processor Name.
67 *
68 * @var string
69 */
70 public $title;
71 /**
72 * Payment Processor Description.
73 *
74 * @var string
75 */
76 public $description;
77 /**
78 * Is this processor active?
79 *
80 * @var boolean
81 */
82 public $is_active;
83 /**
84 * Is this processor the default?
85 *
86 * @var boolean
87 */
88 public $is_default;
89 /**
90 *
91 * @var string
92 */
93 public $user_name_label;
94 /**
95 *
96 * @var string
97 */
98 public $password_label;
99 /**
100 *
101 * @var string
102 */
103 public $signature_label;
104 /**
105 *
106 * @var string
107 */
108 public $subject_label;
109 /**
110 *
111 * @var string
112 */
113 public $class_name;
114 /**
115 *
116 * @var string
117 */
118 public $url_site_default;
119 /**
120 *
121 * @var string
122 */
123 public $url_api_default;
124 /**
125 *
126 * @var string
127 */
128 public $url_recur_default;
129 /**
130 *
131 * @var string
132 */
133 public $url_button_default;
134 /**
135 *
136 * @var string
137 */
138 public $url_site_test_default;
139 /**
140 *
141 * @var string
142 */
143 public $url_api_test_default;
144 /**
145 *
146 * @var string
147 */
148 public $url_recur_test_default;
149 /**
150 *
151 * @var string
152 */
153 public $url_button_test_default;
154 /**
155 * Billing Mode (deprecated)
156 *
157 * @var int unsigned
158 */
159 public $billing_mode;
160 /**
161 * Can process recurring contributions
162 *
163 * @var boolean
164 */
165 public $is_recur;
166 /**
167 * Payment Type: Credit or Debit (deprecated)
168 *
169 * @var int unsigned
170 */
171 public $payment_type;
172 /**
173 * Payment Instrument ID
174 *
175 * @var int unsigned
176 */
177 public $payment_instrument_id;
178 /**
f41f0342 179 * Class constructor.
e501603b
TO
180 */
181 function __construct() {
182 $this->__table = 'civicrm_payment_processor_type';
183 parent::__construct();
184 }
185 /**
186 * Returns all the column names of this table
187 *
188 * @return array
189 */
190 static function &fields() {
346aaaba
TO
191 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
192 Civi::$statics[__CLASS__]['fields'] = array(
e501603b
TO
193 'id' => array(
194 'name' => 'id',
195 'type' => CRM_Utils_Type::T_INT,
196 'title' => ts('Payment Processor Type ID') ,
197 'description' => 'Payment Processor Type ID',
198 'required' => true,
522a26c9 199 'table_name' => 'civicrm_payment_processor_type',
200 'entity' => 'PaymentProcessorType',
201 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
202 ) ,
203 'name' => array(
204 'name' => 'name',
205 'type' => CRM_Utils_Type::T_STRING,
206 'title' => ts('Payment Processor variable name to be used in code') ,
207 'description' => 'Payment Processor Name.',
208 'maxlength' => 64,
209 'size' => CRM_Utils_Type::BIG,
522a26c9 210 'table_name' => 'civicrm_payment_processor_type',
211 'entity' => 'PaymentProcessorType',
212 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
213 ) ,
214 'title' => array(
215 'name' => 'title',
216 'type' => CRM_Utils_Type::T_STRING,
217 'title' => ts('Payment Processor Title') ,
218 'description' => 'Payment Processor Name.',
219 'maxlength' => 127,
220 'size' => CRM_Utils_Type::HUGE,
522a26c9 221 'table_name' => 'civicrm_payment_processor_type',
222 'entity' => 'PaymentProcessorType',
223 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
224 ) ,
225 'description' => array(
226 'name' => 'description',
227 'type' => CRM_Utils_Type::T_STRING,
228 'title' => ts('Processor Type Description') ,
229 'description' => 'Payment Processor Description.',
230 'maxlength' => 255,
231 'size' => CRM_Utils_Type::HUGE,
522a26c9 232 'table_name' => 'civicrm_payment_processor_type',
233 'entity' => 'PaymentProcessorType',
234 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
235 ) ,
236 'is_active' => array(
237 'name' => 'is_active',
238 'type' => CRM_Utils_Type::T_BOOLEAN,
239 'title' => ts('Processor Type Is Active?') ,
240 'description' => 'Is this processor active?',
522a26c9 241 'table_name' => 'civicrm_payment_processor_type',
242 'entity' => 'PaymentProcessorType',
243 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
244 ) ,
245 'is_default' => array(
246 'name' => 'is_default',
247 'type' => CRM_Utils_Type::T_BOOLEAN,
248 'title' => ts('Processor Type is Default?') ,
249 'description' => 'Is this processor the default?',
522a26c9 250 'table_name' => 'civicrm_payment_processor_type',
251 'entity' => 'PaymentProcessorType',
252 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
253 ) ,
254 'user_name_label' => array(
255 'name' => 'user_name_label',
256 'type' => CRM_Utils_Type::T_STRING,
257 'title' => ts('Label for User Name if used') ,
258 'maxlength' => 255,
259 'size' => CRM_Utils_Type::HUGE,
522a26c9 260 'table_name' => 'civicrm_payment_processor_type',
261 'entity' => 'PaymentProcessorType',
262 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
263 ) ,
264 'password_label' => array(
265 'name' => 'password_label',
266 'type' => CRM_Utils_Type::T_STRING,
267 'title' => ts('Label for password') ,
268 'maxlength' => 255,
269 'size' => CRM_Utils_Type::HUGE,
522a26c9 270 'table_name' => 'civicrm_payment_processor_type',
271 'entity' => 'PaymentProcessorType',
272 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
273 ) ,
274 'signature_label' => array(
275 'name' => 'signature_label',
276 'type' => CRM_Utils_Type::T_STRING,
277 'title' => ts('Label for Signature') ,
278 'maxlength' => 255,
279 'size' => CRM_Utils_Type::HUGE,
522a26c9 280 'table_name' => 'civicrm_payment_processor_type',
281 'entity' => 'PaymentProcessorType',
282 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
283 ) ,
284 'subject_label' => array(
285 'name' => 'subject_label',
286 'type' => CRM_Utils_Type::T_STRING,
287 'title' => ts('Label for Subject') ,
288 'maxlength' => 255,
289 'size' => CRM_Utils_Type::HUGE,
522a26c9 290 'table_name' => 'civicrm_payment_processor_type',
291 'entity' => 'PaymentProcessorType',
292 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
293 ) ,
294 'class_name' => array(
295 'name' => 'class_name',
296 'type' => CRM_Utils_Type::T_STRING,
297 'title' => ts('Suffix for PHP class name implementation') ,
298 'maxlength' => 255,
299 'size' => CRM_Utils_Type::HUGE,
522a26c9 300 'table_name' => 'civicrm_payment_processor_type',
301 'entity' => 'PaymentProcessorType',
302 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
303 ) ,
304 'url_site_default' => array(
305 'name' => 'url_site_default',
306 'type' => CRM_Utils_Type::T_STRING,
307 'title' => ts('Default Live Site URL') ,
308 'maxlength' => 255,
309 'size' => CRM_Utils_Type::HUGE,
522a26c9 310 'table_name' => 'civicrm_payment_processor_type',
311 'entity' => 'PaymentProcessorType',
312 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
313 ) ,
314 'url_api_default' => array(
315 'name' => 'url_api_default',
316 'type' => CRM_Utils_Type::T_STRING,
317 'title' => ts('Default API Site URL') ,
318 'maxlength' => 255,
319 'size' => CRM_Utils_Type::HUGE,
522a26c9 320 'table_name' => 'civicrm_payment_processor_type',
321 'entity' => 'PaymentProcessorType',
322 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
323 ) ,
324 'url_recur_default' => array(
325 'name' => 'url_recur_default',
326 'type' => CRM_Utils_Type::T_STRING,
327 'title' => ts('Default Live Recurring Payments URL') ,
328 'maxlength' => 255,
329 'size' => CRM_Utils_Type::HUGE,
522a26c9 330 'table_name' => 'civicrm_payment_processor_type',
331 'entity' => 'PaymentProcessorType',
332 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
333 ) ,
334 'url_button_default' => array(
335 'name' => 'url_button_default',
336 'type' => CRM_Utils_Type::T_STRING,
337 'title' => ts('Default Live Button URL') ,
338 'maxlength' => 255,
339 'size' => CRM_Utils_Type::HUGE,
522a26c9 340 'table_name' => 'civicrm_payment_processor_type',
341 'entity' => 'PaymentProcessorType',
342 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
343 ) ,
344 'url_site_test_default' => array(
345 'name' => 'url_site_test_default',
346 'type' => CRM_Utils_Type::T_STRING,
347 'title' => ts('Default Test Site URL') ,
348 'maxlength' => 255,
349 'size' => CRM_Utils_Type::HUGE,
522a26c9 350 'table_name' => 'civicrm_payment_processor_type',
351 'entity' => 'PaymentProcessorType',
352 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
353 ) ,
354 'url_api_test_default' => array(
355 'name' => 'url_api_test_default',
356 'type' => CRM_Utils_Type::T_STRING,
357 'title' => ts('Default Test API URL') ,
358 'maxlength' => 255,
359 'size' => CRM_Utils_Type::HUGE,
522a26c9 360 'table_name' => 'civicrm_payment_processor_type',
361 'entity' => 'PaymentProcessorType',
362 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
363 ) ,
364 'url_recur_test_default' => array(
365 'name' => 'url_recur_test_default',
366 'type' => CRM_Utils_Type::T_STRING,
367 'title' => ts('Default Test Recurring Payment URL') ,
368 'maxlength' => 255,
369 'size' => CRM_Utils_Type::HUGE,
522a26c9 370 'table_name' => 'civicrm_payment_processor_type',
371 'entity' => 'PaymentProcessorType',
372 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
373 ) ,
374 'url_button_test_default' => array(
375 'name' => 'url_button_test_default',
376 'type' => CRM_Utils_Type::T_STRING,
377 'title' => ts('Default Test Button URL') ,
378 'maxlength' => 255,
379 'size' => CRM_Utils_Type::HUGE,
522a26c9 380 'table_name' => 'civicrm_payment_processor_type',
381 'entity' => 'PaymentProcessorType',
382 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
383 ) ,
384 'billing_mode' => array(
385 'name' => 'billing_mode',
386 'type' => CRM_Utils_Type::T_INT,
387 'title' => ts('Billing Mode') ,
388 'description' => 'Billing Mode (deprecated)',
389 'required' => true,
522a26c9 390 'table_name' => 'civicrm_payment_processor_type',
391 'entity' => 'PaymentProcessorType',
392 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
393 'html' => array(
394 'type' => 'Select',
395 ) ,
396 'pseudoconstant' => array(
397 'callback' => 'CRM_Core_SelectValues::billingMode',
398 )
399 ) ,
400 'is_recur' => array(
401 'name' => 'is_recur',
402 'type' => CRM_Utils_Type::T_BOOLEAN,
403 'title' => ts('Processor Type Supports Recurring?') ,
404 'description' => 'Can process recurring contributions',
522a26c9 405 'table_name' => 'civicrm_payment_processor_type',
406 'entity' => 'PaymentProcessorType',
407 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
408 ) ,
409 'payment_type' => array(
410 'name' => 'payment_type',
411 'type' => CRM_Utils_Type::T_INT,
412 'title' => ts('Processor Type Payment Type') ,
413 'description' => 'Payment Type: Credit or Debit (deprecated)',
414 'default' => '1',
522a26c9 415 'table_name' => 'civicrm_payment_processor_type',
416 'entity' => 'PaymentProcessorType',
417 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
418 ) ,
419 'payment_instrument_id' => array(
420 'name' => 'payment_instrument_id',
421 'type' => CRM_Utils_Type::T_INT,
422 'title' => ts('Payment Method') ,
423 'description' => 'Payment Instrument ID',
424 'default' => '1',
522a26c9 425 'table_name' => 'civicrm_payment_processor_type',
426 'entity' => 'PaymentProcessorType',
427 'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
e501603b
TO
428 'pseudoconstant' => array(
429 'optionGroupName' => 'payment_instrument',
430 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
431 )
432 ) ,
433 );
346aaaba 434 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 435 }
346aaaba 436 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
437 }
438 /**
bd8e0b14 439 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
440 *
441 * @return array
bd8e0b14 442 * Array(string $name => string $uniqueName).
e501603b
TO
443 */
444 static function &fieldKeys() {
bd8e0b14
TO
445 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
446 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 447 }
bd8e0b14 448 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
449 }
450 /**
451 * Returns the names of this table
452 *
453 * @return string
454 */
455 static function getTableName() {
456 return self::$_tableName;
457 }
458 /**
459 * Returns if this table needs to be logged
460 *
461 * @return boolean
462 */
463 function getLog() {
464 return self::$_log;
465 }
466 /**
467 * Returns the list of fields that can be imported
468 *
469 * @param bool $prefix
470 *
471 * @return array
472 */
473 static function &import($prefix = false) {
60808919
TO
474 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor_type', $prefix, array());
475 return $r;
e501603b
TO
476 }
477 /**
478 * Returns the list of fields that can be exported
479 *
480 * @param bool $prefix
481 *
482 * @return array
483 */
484 static function &export($prefix = false) {
60808919
TO
485 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor_type', $prefix, array());
486 return $r;
e501603b
TO
487 }
488}