Remove unused parameters from BaseIPN->cancelled signature
[civicrm-core.git] / CRM / Core / DAO / UFGroup.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC https://civicrm.org/licensing
6 *
7 * Generated from xml/schema/CRM/Core/UFGroup.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:e33df676b4e3ae50e18f1c44e437e3ea)
10 */
11
12 /**
13 * Database access object for the UFGroup entity.
14 */
15 class CRM_Core_DAO_UFGroup extends CRM_Core_DAO {
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '1.1';
18
19 /**
20 * Static instance to hold the table name.
21 *
22 * @var string
23 */
24 public static $_tableName = 'civicrm_uf_group';
25
26 /**
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
28 *
29 * @var bool
30 */
31 public static $_log = TRUE;
32
33 /**
34 * Unique table ID
35 *
36 * @var int
37 */
38 public $id;
39
40 /**
41 * Is this form currently active? If false, hide all related fields for all sharing contexts.
42 *
43 * @var bool
44 */
45 public $is_active;
46
47 /**
48 * Comma separated list of the type(s) of profile fields.
49 *
50 * @var string
51 */
52 public $group_type;
53
54 /**
55 * Form title.
56 *
57 * @var string
58 */
59 public $title;
60
61 /**
62 * Profile Form Public title
63 *
64 * @var string
65 */
66 public $frontend_title;
67
68 /**
69 * Optional verbose description of the profile.
70 *
71 * @var text
72 */
73 public $description;
74
75 /**
76 * Description and/or help text to display before fields in form.
77 *
78 * @var text
79 */
80 public $help_pre;
81
82 /**
83 * Description and/or help text to display after fields in form.
84 *
85 * @var text
86 */
87 public $help_post;
88
89 /**
90 * Group id, foreign key from civicrm_group
91 *
92 * @var int
93 */
94 public $limit_listings_group_id;
95
96 /**
97 * Redirect to URL.
98 *
99 * @var string
100 */
101 public $post_URL;
102
103 /**
104 * foreign key to civicrm_group_id
105 *
106 * @var int
107 */
108 public $add_to_group_id;
109
110 /**
111 * Should a CAPTCHA widget be included this Profile form.
112 *
113 * @var bool
114 */
115 public $add_captcha;
116
117 /**
118 * Do we want to map results from this profile.
119 *
120 * @var bool
121 */
122 public $is_map;
123
124 /**
125 * Should edit link display in profile selector
126 *
127 * @var bool
128 */
129 public $is_edit_link;
130
131 /**
132 * Should we display a link to the website profile in profile selector
133 *
134 * @var bool
135 */
136 public $is_uf_link;
137
138 /**
139 * Should we update the contact record if we find a duplicate
140 *
141 * @var bool
142 */
143 public $is_update_dupe;
144
145 /**
146 * Redirect to URL when Cancle button clik .
147 *
148 * @var string
149 */
150 public $cancel_URL;
151
152 /**
153 * Should we create a cms user for this profile
154 *
155 * @var bool
156 */
157 public $is_cms_user;
158
159 /**
160 * @var text
161 */
162 public $notify;
163
164 /**
165 * Is this group reserved for use by some other CiviCRM functionality?
166 *
167 * @var bool
168 */
169 public $is_reserved;
170
171 /**
172 * Name of the UF group for directly addressing it in the codebase
173 *
174 * @var string
175 */
176 public $name;
177
178 /**
179 * FK to civicrm_contact, who created this UF group
180 *
181 * @var int
182 */
183 public $created_id;
184
185 /**
186 * Date and time this UF group was created.
187 *
188 * @var datetime
189 */
190 public $created_date;
191
192 /**
193 * Should we include proximity search feature in this profile search form?
194 *
195 * @var bool
196 */
197 public $is_proximity_search;
198
199 /**
200 * Custom Text to display on the Cancel button when used in create or edit mode
201 *
202 * @var string
203 */
204 public $cancel_button_text;
205
206 /**
207 * Custom Text to display on the submit button on profile edit/create screens
208 *
209 * @var string
210 */
211 public $submit_button_text;
212
213 /**
214 * Should a Cancel button be included in this Profile form.
215 *
216 * @var bool
217 */
218 public $add_cancel_button;
219
220 /**
221 * Class constructor.
222 */
223 public function __construct() {
224 $this->__table = 'civicrm_uf_group';
225 parent::__construct();
226 }
227
228 /**
229 * Returns localized title of this entity.
230 *
231 * @param bool $plural
232 * Whether to return the plural version of the title.
233 */
234 public static function getEntityTitle($plural = FALSE) {
235 return $plural ? ts('UFGroups') : ts('UFGroup');
236 }
237
238 /**
239 * Returns foreign keys and entity references.
240 *
241 * @return array
242 * [CRM_Core_Reference_Interface]
243 */
244 public static function getReferenceColumns() {
245 if (!isset(Civi::$statics[__CLASS__]['links'])) {
246 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
247 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'limit_listings_group_id', 'civicrm_group', 'id');
248 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'add_to_group_id', 'civicrm_group', 'id');
249 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id');
250 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
251 }
252 return Civi::$statics[__CLASS__]['links'];
253 }
254
255 /**
256 * Returns all the column names of this table
257 *
258 * @return array
259 */
260 public static function &fields() {
261 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
262 Civi::$statics[__CLASS__]['fields'] = [
263 'id' => [
264 'name' => 'id',
265 'type' => CRM_Utils_Type::T_INT,
266 'title' => ts('Profile ID'),
267 'description' => ts('Unique table ID'),
268 'required' => TRUE,
269 'where' => 'civicrm_uf_group.id',
270 'table_name' => 'civicrm_uf_group',
271 'entity' => 'UFGroup',
272 'bao' => 'CRM_Core_BAO_UFGroup',
273 'localizable' => 0,
274 'add' => '1.1',
275 ],
276 'is_active' => [
277 'name' => 'is_active',
278 'type' => CRM_Utils_Type::T_BOOLEAN,
279 'title' => ts('Profile Is Active'),
280 'description' => ts('Is this form currently active? If false, hide all related fields for all sharing contexts.'),
281 'where' => 'civicrm_uf_group.is_active',
282 'default' => '1',
283 'table_name' => 'civicrm_uf_group',
284 'entity' => 'UFGroup',
285 'bao' => 'CRM_Core_BAO_UFGroup',
286 'localizable' => 0,
287 'add' => '1.1',
288 ],
289 'group_type' => [
290 'name' => 'group_type',
291 'type' => CRM_Utils_Type::T_STRING,
292 'title' => ts('Profile Group Type'),
293 'description' => ts('Comma separated list of the type(s) of profile fields.'),
294 'maxlength' => 255,
295 'size' => CRM_Utils_Type::HUGE,
296 'import' => TRUE,
297 'where' => 'civicrm_uf_group.group_type',
298 'export' => TRUE,
299 'table_name' => 'civicrm_uf_group',
300 'entity' => 'UFGroup',
301 'bao' => 'CRM_Core_BAO_UFGroup',
302 'localizable' => 0,
303 'serialize' => self::SERIALIZE_COMMA,
304 'add' => '2.1',
305 ],
306 'title' => [
307 'name' => 'title',
308 'type' => CRM_Utils_Type::T_STRING,
309 'title' => ts('Profile Name'),
310 'description' => ts('Form title.'),
311 'required' => TRUE,
312 'maxlength' => 64,
313 'size' => CRM_Utils_Type::BIG,
314 'where' => 'civicrm_uf_group.title',
315 'table_name' => 'civicrm_uf_group',
316 'entity' => 'UFGroup',
317 'bao' => 'CRM_Core_BAO_UFGroup',
318 'localizable' => 1,
319 'html' => [
320 'type' => 'Text',
321 ],
322 'add' => '1.1',
323 ],
324 'frontend_title' => [
325 'name' => 'frontend_title',
326 'type' => CRM_Utils_Type::T_STRING,
327 'title' => ts('Public Title'),
328 'description' => ts('Profile Form Public title'),
329 'maxlength' => 64,
330 'size' => CRM_Utils_Type::BIG,
331 'where' => 'civicrm_uf_group.frontend_title',
332 'table_name' => 'civicrm_uf_group',
333 'entity' => 'UFGroup',
334 'bao' => 'CRM_Core_BAO_UFGroup',
335 'localizable' => 1,
336 'html' => [
337 'type' => 'Text',
338 ],
339 'add' => '4.7',
340 ],
341 'description' => [
342 'name' => 'description',
343 'type' => CRM_Utils_Type::T_TEXT,
344 'title' => ts('Profile Description'),
345 'description' => ts('Optional verbose description of the profile.'),
346 'rows' => 2,
347 'cols' => 60,
348 'where' => 'civicrm_uf_group.description',
349 'table_name' => 'civicrm_uf_group',
350 'entity' => 'UFGroup',
351 'bao' => 'CRM_Core_BAO_UFGroup',
352 'localizable' => 0,
353 'html' => [
354 'type' => 'TextArea',
355 ],
356 'add' => '4.4',
357 ],
358 'help_pre' => [
359 'name' => 'help_pre',
360 'type' => CRM_Utils_Type::T_TEXT,
361 'title' => ts('Help Pre'),
362 'description' => ts('Description and/or help text to display before fields in form.'),
363 'rows' => 4,
364 'cols' => 80,
365 'where' => 'civicrm_uf_group.help_pre',
366 'table_name' => 'civicrm_uf_group',
367 'entity' => 'UFGroup',
368 'bao' => 'CRM_Core_BAO_UFGroup',
369 'localizable' => 1,
370 'html' => [
371 'type' => 'TextArea',
372 ],
373 'add' => '1.2',
374 ],
375 'help_post' => [
376 'name' => 'help_post',
377 'type' => CRM_Utils_Type::T_TEXT,
378 'title' => ts('Profile Post Text'),
379 'description' => ts('Description and/or help text to display after fields in form.'),
380 'rows' => 4,
381 'cols' => 80,
382 'where' => 'civicrm_uf_group.help_post',
383 'table_name' => 'civicrm_uf_group',
384 'entity' => 'UFGroup',
385 'bao' => 'CRM_Core_BAO_UFGroup',
386 'localizable' => 1,
387 'html' => [
388 'type' => 'TextArea',
389 ],
390 'add' => '1.2',
391 ],
392 'limit_listings_group_id' => [
393 'name' => 'limit_listings_group_id',
394 'type' => CRM_Utils_Type::T_INT,
395 'title' => ts('Profile Search Limit Group'),
396 'description' => ts('Group id, foreign key from civicrm_group'),
397 'where' => 'civicrm_uf_group.limit_listings_group_id',
398 'table_name' => 'civicrm_uf_group',
399 'entity' => 'UFGroup',
400 'bao' => 'CRM_Core_BAO_UFGroup',
401 'localizable' => 0,
402 'FKClassName' => 'CRM_Contact_DAO_Group',
403 'add' => '1.4',
404 ],
405 'post_URL' => [
406 'name' => 'post_URL',
407 'type' => CRM_Utils_Type::T_STRING,
408 'title' => ts('Post Url'),
409 'description' => ts('Redirect to URL.'),
410 'maxlength' => 255,
411 'size' => CRM_Utils_Type::HUGE,
412 'where' => 'civicrm_uf_group.post_URL',
413 'table_name' => 'civicrm_uf_group',
414 'entity' => 'UFGroup',
415 'bao' => 'CRM_Core_BAO_UFGroup',
416 'localizable' => 0,
417 'add' => '1.4',
418 ],
419 'add_to_group_id' => [
420 'name' => 'add_to_group_id',
421 'type' => CRM_Utils_Type::T_INT,
422 'title' => ts('Add Contact To Group'),
423 'description' => ts('foreign key to civicrm_group_id'),
424 'where' => 'civicrm_uf_group.add_to_group_id',
425 'table_name' => 'civicrm_uf_group',
426 'entity' => 'UFGroup',
427 'bao' => 'CRM_Core_BAO_UFGroup',
428 'localizable' => 0,
429 'FKClassName' => 'CRM_Contact_DAO_Group',
430 'add' => NULL,
431 ],
432 'add_captcha' => [
433 'name' => 'add_captcha',
434 'type' => CRM_Utils_Type::T_BOOLEAN,
435 'title' => ts('Show Captcha On Profile'),
436 'description' => ts('Should a CAPTCHA widget be included this Profile form.'),
437 'where' => 'civicrm_uf_group.add_captcha',
438 'default' => '0',
439 'table_name' => 'civicrm_uf_group',
440 'entity' => 'UFGroup',
441 'bao' => 'CRM_Core_BAO_UFGroup',
442 'localizable' => 0,
443 'add' => '1.1',
444 ],
445 'is_map' => [
446 'name' => 'is_map',
447 'type' => CRM_Utils_Type::T_BOOLEAN,
448 'title' => ts('Map Profile'),
449 'description' => ts('Do we want to map results from this profile.'),
450 'where' => 'civicrm_uf_group.is_map',
451 'default' => '0',
452 'table_name' => 'civicrm_uf_group',
453 'entity' => 'UFGroup',
454 'bao' => 'CRM_Core_BAO_UFGroup',
455 'localizable' => 0,
456 'add' => '1.5',
457 ],
458 'is_edit_link' => [
459 'name' => 'is_edit_link',
460 'type' => CRM_Utils_Type::T_BOOLEAN,
461 'title' => ts('Show Edit Link?'),
462 'description' => ts('Should edit link display in profile selector'),
463 'where' => 'civicrm_uf_group.is_edit_link',
464 'default' => '0',
465 'table_name' => 'civicrm_uf_group',
466 'entity' => 'UFGroup',
467 'bao' => 'CRM_Core_BAO_UFGroup',
468 'localizable' => 0,
469 'add' => '1.6',
470 ],
471 'is_uf_link' => [
472 'name' => 'is_uf_link',
473 'type' => CRM_Utils_Type::T_BOOLEAN,
474 'title' => ts('Show Link to CMS User'),
475 'description' => ts('Should we display a link to the website profile in profile selector'),
476 'where' => 'civicrm_uf_group.is_uf_link',
477 'default' => '0',
478 'table_name' => 'civicrm_uf_group',
479 'entity' => 'UFGroup',
480 'bao' => 'CRM_Core_BAO_UFGroup',
481 'localizable' => 0,
482 'add' => '1.7',
483 ],
484 'is_update_dupe' => [
485 'name' => 'is_update_dupe',
486 'type' => CRM_Utils_Type::T_BOOLEAN,
487 'title' => ts('Update on Duplicate'),
488 'description' => ts('Should we update the contact record if we find a duplicate'),
489 'where' => 'civicrm_uf_group.is_update_dupe',
490 'default' => '0',
491 'table_name' => 'civicrm_uf_group',
492 'entity' => 'UFGroup',
493 'bao' => 'CRM_Core_BAO_UFGroup',
494 'localizable' => 0,
495 'add' => '1.7',
496 ],
497 'cancel_URL' => [
498 'name' => 'cancel_URL',
499 'type' => CRM_Utils_Type::T_STRING,
500 'title' => ts('Profile Cancel URL'),
501 'description' => ts('Redirect to URL when Cancle button clik .'),
502 'maxlength' => 255,
503 'size' => CRM_Utils_Type::HUGE,
504 'where' => 'civicrm_uf_group.cancel_URL',
505 'table_name' => 'civicrm_uf_group',
506 'entity' => 'UFGroup',
507 'bao' => 'CRM_Core_BAO_UFGroup',
508 'localizable' => 0,
509 'add' => '1.4',
510 ],
511 'is_cms_user' => [
512 'name' => 'is_cms_user',
513 'type' => CRM_Utils_Type::T_BOOLEAN,
514 'title' => ts('Create CMS User?'),
515 'description' => ts('Should we create a cms user for this profile '),
516 'where' => 'civicrm_uf_group.is_cms_user',
517 'default' => '0',
518 'table_name' => 'civicrm_uf_group',
519 'entity' => 'UFGroup',
520 'bao' => 'CRM_Core_BAO_UFGroup',
521 'localizable' => 0,
522 'add' => '1.8',
523 ],
524 'notify' => [
525 'name' => 'notify',
526 'type' => CRM_Utils_Type::T_TEXT,
527 'title' => ts('Notify on Profile Submit'),
528 'where' => 'civicrm_uf_group.notify',
529 'table_name' => 'civicrm_uf_group',
530 'entity' => 'UFGroup',
531 'bao' => 'CRM_Core_BAO_UFGroup',
532 'localizable' => 0,
533 'add' => '1.8',
534 ],
535 'is_reserved' => [
536 'name' => 'is_reserved',
537 'type' => CRM_Utils_Type::T_BOOLEAN,
538 'title' => ts('Profile Is Reserved'),
539 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'),
540 'where' => 'civicrm_uf_group.is_reserved',
541 'table_name' => 'civicrm_uf_group',
542 'entity' => 'UFGroup',
543 'bao' => 'CRM_Core_BAO_UFGroup',
544 'localizable' => 0,
545 'add' => '3.0',
546 ],
547 'name' => [
548 'name' => 'name',
549 'type' => CRM_Utils_Type::T_STRING,
550 'title' => ts('Profile Name'),
551 'description' => ts('Name of the UF group for directly addressing it in the codebase'),
552 'maxlength' => 64,
553 'size' => CRM_Utils_Type::BIG,
554 'where' => 'civicrm_uf_group.name',
555 'table_name' => 'civicrm_uf_group',
556 'entity' => 'UFGroup',
557 'bao' => 'CRM_Core_BAO_UFGroup',
558 'localizable' => 0,
559 'add' => '3.0',
560 ],
561 'created_id' => [
562 'name' => 'created_id',
563 'type' => CRM_Utils_Type::T_INT,
564 'title' => ts('Profile Created By'),
565 'description' => ts('FK to civicrm_contact, who created this UF group'),
566 'where' => 'civicrm_uf_group.created_id',
567 'table_name' => 'civicrm_uf_group',
568 'entity' => 'UFGroup',
569 'bao' => 'CRM_Core_BAO_UFGroup',
570 'localizable' => 0,
571 'FKClassName' => 'CRM_Contact_DAO_Contact',
572 'add' => '3.0',
573 ],
574 'created_date' => [
575 'name' => 'created_date',
576 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
577 'title' => ts('UF Group Created Date'),
578 'description' => ts('Date and time this UF group was created.'),
579 'where' => 'civicrm_uf_group.created_date',
580 'table_name' => 'civicrm_uf_group',
581 'entity' => 'UFGroup',
582 'bao' => 'CRM_Core_BAO_UFGroup',
583 'localizable' => 0,
584 'add' => '3.0',
585 ],
586 'is_proximity_search' => [
587 'name' => 'is_proximity_search',
588 'type' => CRM_Utils_Type::T_BOOLEAN,
589 'title' => ts('Include Proximity Search?'),
590 'description' => ts('Should we include proximity search feature in this profile search form?'),
591 'where' => 'civicrm_uf_group.is_proximity_search',
592 'default' => '0',
593 'table_name' => 'civicrm_uf_group',
594 'entity' => 'UFGroup',
595 'bao' => 'CRM_Core_BAO_UFGroup',
596 'localizable' => 0,
597 'add' => '3.2',
598 ],
599 'cancel_button_text' => [
600 'name' => 'cancel_button_text',
601 'type' => CRM_Utils_Type::T_STRING,
602 'title' => ts('Cancel Button Text'),
603 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'),
604 'maxlength' => 64,
605 'size' => CRM_Utils_Type::BIG,
606 'where' => 'civicrm_uf_group.cancel_button_text',
607 'default' => 'NULL',
608 'table_name' => 'civicrm_uf_group',
609 'entity' => 'UFGroup',
610 'bao' => 'CRM_Core_BAO_UFGroup',
611 'localizable' => 1,
612 'html' => [
613 'type' => 'Text',
614 ],
615 'add' => '4.7',
616 ],
617 'submit_button_text' => [
618 'name' => 'submit_button_text',
619 'type' => CRM_Utils_Type::T_STRING,
620 'title' => ts('Submit Button Text'),
621 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'),
622 'maxlength' => 64,
623 'size' => CRM_Utils_Type::BIG,
624 'where' => 'civicrm_uf_group.submit_button_text',
625 'default' => 'NULL',
626 'table_name' => 'civicrm_uf_group',
627 'entity' => 'UFGroup',
628 'bao' => 'CRM_Core_BAO_UFGroup',
629 'localizable' => 1,
630 'html' => [
631 'type' => 'Text',
632 ],
633 'add' => '4.7',
634 ],
635 'add_cancel_button' => [
636 'name' => 'add_cancel_button',
637 'type' => CRM_Utils_Type::T_BOOLEAN,
638 'title' => ts('Include Cancel Button'),
639 'description' => ts('Should a Cancel button be included in this Profile form.'),
640 'where' => 'civicrm_uf_group.add_cancel_button',
641 'default' => '1',
642 'table_name' => 'civicrm_uf_group',
643 'entity' => 'UFGroup',
644 'bao' => 'CRM_Core_BAO_UFGroup',
645 'localizable' => 0,
646 'add' => '5.0',
647 ],
648 ];
649 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
650 }
651 return Civi::$statics[__CLASS__]['fields'];
652 }
653
654 /**
655 * Return a mapping from field-name to the corresponding key (as used in fields()).
656 *
657 * @return array
658 * Array(string $name => string $uniqueName).
659 */
660 public static function &fieldKeys() {
661 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
662 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
663 }
664 return Civi::$statics[__CLASS__]['fieldKeys'];
665 }
666
667 /**
668 * Returns the names of this table
669 *
670 * @return string
671 */
672 public static function getTableName() {
673 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
674 }
675
676 /**
677 * Returns if this table needs to be logged
678 *
679 * @return bool
680 */
681 public function getLog() {
682 return self::$_log;
683 }
684
685 /**
686 * Returns the list of fields that can be imported
687 *
688 * @param bool $prefix
689 *
690 * @return array
691 */
692 public static function &import($prefix = FALSE) {
693 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_group', $prefix, []);
694 return $r;
695 }
696
697 /**
698 * Returns the list of fields that can be exported
699 *
700 * @param bool $prefix
701 *
702 * @return array
703 */
704 public static function &export($prefix = FALSE) {
705 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_group', $prefix, []);
706 return $r;
707 }
708
709 /**
710 * Returns the list of indices
711 *
712 * @param bool $localize
713 *
714 * @return array
715 */
716 public static function indices($localize = TRUE) {
717 $indices = [
718 'UI_name' => [
719 'name' => 'UI_name',
720 'field' => [
721 0 => 'name',
722 ],
723 'localizable' => FALSE,
724 'unique' => TRUE,
725 'sig' => 'civicrm_uf_group::1::name',
726 ],
727 ];
728 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
729 }
730
731 }