5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/UFGroup.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:824fe358fcaddc89f302bf03ba7b82bc)
13 * Database access object for the UFGroup entity.
15 class CRM_Core_DAO_UFGroup
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '1.1';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_uf_group';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = TRUE;
41 * Is this form currently active? If false, hide all related fields for all sharing contexts.
48 * Comma separated list of the type(s) of profile fields.
62 * Profile Form Public title
66 public $frontend_title;
69 * Optional verbose description of the profile.
76 * Description and/or help text to display before fields in form.
83 * Description and/or help text to display after fields in form.
90 * Group id, foreign key from civicrm_group
94 public $limit_listings_group_id;
104 * foreign key to civicrm_group_id
108 public $add_to_group_id;
111 * Should a CAPTCHA widget be included this Profile form.
118 * Do we want to map results from this profile.
125 * Should edit link display in profile selector
129 public $is_edit_link;
132 * Should we display a link to the website profile in profile selector
139 * Should we update the contact record if we find a duplicate
143 public $is_update_dupe;
146 * Redirect to URL when Cancle button clik .
153 * Should we create a cms user for this profile
165 * Is this group reserved for use by some other CiviCRM functionality?
172 * Name of the UF group for directly addressing it in the codebase
179 * FK to civicrm_contact, who created this UF group
186 * Date and time this UF group was created.
190 public $created_date;
193 * Should we include proximity search feature in this profile search form?
197 public $is_proximity_search;
200 * Custom Text to display on the Cancel button when used in create or edit mode
204 public $cancel_button_text;
207 * Custom Text to display on the submit button on profile edit/create screens
211 public $submit_button_text;
214 * Should a Cancel button be included in this Profile form.
218 public $add_cancel_button;
223 public function __construct() {
224 $this->__table
= 'civicrm_uf_group';
225 parent
::__construct();
229 * Returns localized title of this entity.
231 * @param bool $plural
232 * Whether to return the plural version of the title.
234 public static function getEntityTitle($plural = FALSE) {
235 return $plural ?
ts('UFGroups') : ts('UFGroup');
239 * Returns foreign keys and entity references.
242 * [CRM_Core_Reference_Interface]
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']);
252 return Civi
::$statics[__CLASS__
]['links'];
256 * Returns all the column names of this table
260 public static function &fields() {
261 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
262 Civi
::$statics[__CLASS__
]['fields'] = [
265 'type' => CRM_Utils_Type
::T_INT
,
266 'title' => ts('Profile ID'),
267 'description' => ts('Unique table ID'),
269 'where' => 'civicrm_uf_group.id',
270 'table_name' => 'civicrm_uf_group',
271 'entity' => 'UFGroup',
272 'bao' => 'CRM_Core_BAO_UFGroup',
281 'name' => 'is_active',
282 'type' => CRM_Utils_Type
::T_BOOLEAN
,
283 'title' => ts('Profile Is Active'),
284 'description' => ts('Is this form currently active? If false, hide all related fields for all sharing contexts.'),
285 'where' => 'civicrm_uf_group.is_active',
287 'table_name' => 'civicrm_uf_group',
288 'entity' => 'UFGroup',
289 'bao' => 'CRM_Core_BAO_UFGroup',
294 'name' => 'group_type',
295 'type' => CRM_Utils_Type
::T_STRING
,
296 'title' => ts('Profile Group Type'),
297 'description' => ts('Comma separated list of the type(s) of profile fields.'),
299 'size' => CRM_Utils_Type
::HUGE
,
301 'where' => 'civicrm_uf_group.group_type',
303 'table_name' => 'civicrm_uf_group',
304 'entity' => 'UFGroup',
305 'bao' => 'CRM_Core_BAO_UFGroup',
307 'serialize' => self
::SERIALIZE_COMMA
,
312 'type' => CRM_Utils_Type
::T_STRING
,
313 'title' => ts('Profile Name'),
314 'description' => ts('Form title.'),
317 'size' => CRM_Utils_Type
::BIG
,
318 'where' => 'civicrm_uf_group.title',
319 'table_name' => 'civicrm_uf_group',
320 'entity' => 'UFGroup',
321 'bao' => 'CRM_Core_BAO_UFGroup',
328 'frontend_title' => [
329 'name' => 'frontend_title',
330 'type' => CRM_Utils_Type
::T_STRING
,
331 'title' => ts('Public Title'),
332 'description' => ts('Profile Form Public title'),
334 'size' => CRM_Utils_Type
::BIG
,
335 'where' => 'civicrm_uf_group.frontend_title',
336 'table_name' => 'civicrm_uf_group',
337 'entity' => 'UFGroup',
338 'bao' => 'CRM_Core_BAO_UFGroup',
346 'name' => 'description',
347 'type' => CRM_Utils_Type
::T_TEXT
,
348 'title' => ts('Profile Description'),
349 'description' => ts('Optional verbose description of the profile.'),
352 'where' => 'civicrm_uf_group.description',
353 'table_name' => 'civicrm_uf_group',
354 'entity' => 'UFGroup',
355 'bao' => 'CRM_Core_BAO_UFGroup',
358 'type' => 'TextArea',
363 'name' => 'help_pre',
364 'type' => CRM_Utils_Type
::T_TEXT
,
365 'title' => ts('Help Pre'),
366 'description' => ts('Description and/or help text to display before fields in form.'),
369 'where' => 'civicrm_uf_group.help_pre',
370 'table_name' => 'civicrm_uf_group',
371 'entity' => 'UFGroup',
372 'bao' => 'CRM_Core_BAO_UFGroup',
375 'type' => 'TextArea',
376 'label' => ts("Pre Help"),
381 'name' => 'help_post',
382 'type' => CRM_Utils_Type
::T_TEXT
,
383 'title' => ts('Profile Post Text'),
384 'description' => ts('Description and/or help text to display after fields in form.'),
387 'where' => 'civicrm_uf_group.help_post',
388 'table_name' => 'civicrm_uf_group',
389 'entity' => 'UFGroup',
390 'bao' => 'CRM_Core_BAO_UFGroup',
393 'type' => 'TextArea',
397 'limit_listings_group_id' => [
398 'name' => 'limit_listings_group_id',
399 'type' => CRM_Utils_Type
::T_INT
,
400 'title' => ts('Search Limit Group ID'),
401 'description' => ts('Group id, foreign key from civicrm_group'),
402 'where' => 'civicrm_uf_group.limit_listings_group_id',
403 'table_name' => 'civicrm_uf_group',
404 'entity' => 'UFGroup',
405 'bao' => 'CRM_Core_BAO_UFGroup',
407 'FKClassName' => 'CRM_Contact_DAO_Group',
409 'label' => ts("Search Limit Group"),
414 'name' => 'post_URL',
415 'type' => CRM_Utils_Type
::T_STRING
,
416 'title' => ts('Post Url'),
417 'description' => ts('Redirect to URL.'),
419 'size' => CRM_Utils_Type
::HUGE
,
420 'where' => 'civicrm_uf_group.post_URL',
421 'table_name' => 'civicrm_uf_group',
422 'entity' => 'UFGroup',
423 'bao' => 'CRM_Core_BAO_UFGroup',
426 'label' => ts("Post URL"),
430 'add_to_group_id' => [
431 'name' => 'add_to_group_id',
432 'type' => CRM_Utils_Type
::T_INT
,
433 'title' => ts('Add Contact To Group ID'),
434 'description' => ts('foreign key to civicrm_group_id'),
435 'where' => 'civicrm_uf_group.add_to_group_id',
436 'table_name' => 'civicrm_uf_group',
437 'entity' => 'UFGroup',
438 'bao' => 'CRM_Core_BAO_UFGroup',
440 'FKClassName' => 'CRM_Contact_DAO_Group',
442 'label' => ts("Add Contact To Group"),
447 'name' => 'add_captcha',
448 'type' => CRM_Utils_Type
::T_BOOLEAN
,
449 'title' => ts('Show Captcha On Profile'),
450 'description' => ts('Should a CAPTCHA widget be included this Profile form.'),
451 'where' => 'civicrm_uf_group.add_captcha',
453 'table_name' => 'civicrm_uf_group',
454 'entity' => 'UFGroup',
455 'bao' => 'CRM_Core_BAO_UFGroup',
461 'type' => CRM_Utils_Type
::T_BOOLEAN
,
462 'title' => ts('Map Profile'),
463 'description' => ts('Do we want to map results from this profile.'),
464 'where' => 'civicrm_uf_group.is_map',
466 'table_name' => 'civicrm_uf_group',
467 'entity' => 'UFGroup',
468 'bao' => 'CRM_Core_BAO_UFGroup',
473 'name' => 'is_edit_link',
474 'type' => CRM_Utils_Type
::T_BOOLEAN
,
475 'title' => ts('Show Edit Link?'),
476 'description' => ts('Should edit link display in profile selector'),
477 'where' => 'civicrm_uf_group.is_edit_link',
479 'table_name' => 'civicrm_uf_group',
480 'entity' => 'UFGroup',
481 'bao' => 'CRM_Core_BAO_UFGroup',
486 'name' => 'is_uf_link',
487 'type' => CRM_Utils_Type
::T_BOOLEAN
,
488 'title' => ts('Show Link to CMS User'),
489 'description' => ts('Should we display a link to the website profile in profile selector'),
490 'where' => 'civicrm_uf_group.is_uf_link',
492 'table_name' => 'civicrm_uf_group',
493 'entity' => 'UFGroup',
494 'bao' => 'CRM_Core_BAO_UFGroup',
498 'is_update_dupe' => [
499 'name' => 'is_update_dupe',
500 'type' => CRM_Utils_Type
::T_BOOLEAN
,
501 'title' => ts('Update on Duplicate'),
502 'description' => ts('Should we update the contact record if we find a duplicate'),
503 'where' => 'civicrm_uf_group.is_update_dupe',
505 'table_name' => 'civicrm_uf_group',
506 'entity' => 'UFGroup',
507 'bao' => 'CRM_Core_BAO_UFGroup',
512 'name' => 'cancel_URL',
513 'type' => CRM_Utils_Type
::T_STRING
,
514 'title' => ts('Profile Cancel URL'),
515 'description' => ts('Redirect to URL when Cancle button clik .'),
517 'size' => CRM_Utils_Type
::HUGE
,
518 'where' => 'civicrm_uf_group.cancel_URL',
519 'table_name' => 'civicrm_uf_group',
520 'entity' => 'UFGroup',
521 'bao' => 'CRM_Core_BAO_UFGroup',
526 'name' => 'is_cms_user',
527 'type' => CRM_Utils_Type
::T_BOOLEAN
,
528 'title' => ts('Create CMS User?'),
529 'description' => ts('Should we create a cms user for this profile '),
530 'where' => 'civicrm_uf_group.is_cms_user',
532 'table_name' => 'civicrm_uf_group',
533 'entity' => 'UFGroup',
534 'bao' => 'CRM_Core_BAO_UFGroup',
540 'type' => CRM_Utils_Type
::T_TEXT
,
541 'title' => ts('Notify on Profile Submit'),
542 'where' => 'civicrm_uf_group.notify',
543 'table_name' => 'civicrm_uf_group',
544 'entity' => 'UFGroup',
545 'bao' => 'CRM_Core_BAO_UFGroup',
550 'name' => 'is_reserved',
551 'type' => CRM_Utils_Type
::T_BOOLEAN
,
552 'title' => ts('Profile Is Reserved'),
553 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'),
554 'where' => 'civicrm_uf_group.is_reserved',
555 'table_name' => 'civicrm_uf_group',
556 'entity' => 'UFGroup',
557 'bao' => 'CRM_Core_BAO_UFGroup',
563 'type' => CRM_Utils_Type
::T_STRING
,
564 'title' => ts('Profile Name'),
565 'description' => ts('Name of the UF group for directly addressing it in the codebase'),
567 'size' => CRM_Utils_Type
::BIG
,
568 'where' => 'civicrm_uf_group.name',
569 'table_name' => 'civicrm_uf_group',
570 'entity' => 'UFGroup',
571 'bao' => 'CRM_Core_BAO_UFGroup',
576 'name' => 'created_id',
577 'type' => CRM_Utils_Type
::T_INT
,
578 'title' => ts('Created By Contact ID'),
579 'description' => ts('FK to civicrm_contact, who created this UF group'),
580 'where' => 'civicrm_uf_group.created_id',
581 'table_name' => 'civicrm_uf_group',
582 'entity' => 'UFGroup',
583 'bao' => 'CRM_Core_BAO_UFGroup',
585 'FKClassName' => 'CRM_Contact_DAO_Contact',
587 'label' => ts("Created By"),
592 'name' => 'created_date',
593 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
594 'title' => ts('UF Group Created Date'),
595 'description' => ts('Date and time this UF group was created.'),
596 'where' => 'civicrm_uf_group.created_date',
597 'table_name' => 'civicrm_uf_group',
598 'entity' => 'UFGroup',
599 'bao' => 'CRM_Core_BAO_UFGroup',
603 'is_proximity_search' => [
604 'name' => 'is_proximity_search',
605 'type' => CRM_Utils_Type
::T_BOOLEAN
,
606 'title' => ts('Include Proximity Search?'),
607 'description' => ts('Should we include proximity search feature in this profile search form?'),
608 'where' => 'civicrm_uf_group.is_proximity_search',
610 'table_name' => 'civicrm_uf_group',
611 'entity' => 'UFGroup',
612 'bao' => 'CRM_Core_BAO_UFGroup',
616 'cancel_button_text' => [
617 'name' => 'cancel_button_text',
618 'type' => CRM_Utils_Type
::T_STRING
,
619 'title' => ts('Cancel Button Text'),
620 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'),
622 'size' => CRM_Utils_Type
::BIG
,
623 'where' => 'civicrm_uf_group.cancel_button_text',
625 'table_name' => 'civicrm_uf_group',
626 'entity' => 'UFGroup',
627 'bao' => 'CRM_Core_BAO_UFGroup',
634 'submit_button_text' => [
635 'name' => 'submit_button_text',
636 'type' => CRM_Utils_Type
::T_STRING
,
637 'title' => ts('Submit Button Text'),
638 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'),
640 'size' => CRM_Utils_Type
::BIG
,
641 'where' => 'civicrm_uf_group.submit_button_text',
643 'table_name' => 'civicrm_uf_group',
644 'entity' => 'UFGroup',
645 'bao' => 'CRM_Core_BAO_UFGroup',
652 'add_cancel_button' => [
653 'name' => 'add_cancel_button',
654 'type' => CRM_Utils_Type
::T_BOOLEAN
,
655 'title' => ts('Include Cancel Button'),
656 'description' => ts('Should a Cancel button be included in this Profile form.'),
657 'where' => 'civicrm_uf_group.add_cancel_button',
659 'table_name' => 'civicrm_uf_group',
660 'entity' => 'UFGroup',
661 'bao' => 'CRM_Core_BAO_UFGroup',
666 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
668 return Civi
::$statics[__CLASS__
]['fields'];
672 * Return a mapping from field-name to the corresponding key (as used in fields()).
675 * Array(string $name => string $uniqueName).
677 public static function &fieldKeys() {
678 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
679 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
681 return Civi
::$statics[__CLASS__
]['fieldKeys'];
685 * Returns the names of this table
689 public static function getTableName() {
690 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
694 * Returns if this table needs to be logged
698 public function getLog() {
703 * Returns the list of fields that can be imported
705 * @param bool $prefix
709 public static function &import($prefix = FALSE) {
710 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
715 * Returns the list of fields that can be exported
717 * @param bool $prefix
721 public static function &export($prefix = FALSE) {
722 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
727 * Returns the list of indices
729 * @param bool $localize
733 public static function indices($localize = TRUE) {
740 'localizable' => FALSE,
742 'sig' => 'civicrm_uf_group::1::name',
745 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;