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