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