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:17f8c18034495ef7294802e4597b06f3)
13 * Database access object for the UFGroup entity.
15 class CRM_Core_DAO_UFGroup
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_uf_group';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
39 * Is this form currently active? If false, hide all related fields for all sharing contexts.
46 * Comma separated list of the type(s) of profile fields.
60 * Profile Form Public title
64 public $frontend_title;
67 * Optional verbose description of the profile.
74 * Description and/or help text to display before fields in form.
81 * Description and/or help text to display after fields in form.
88 * Group id, foreign key from civicrm_group
92 public $limit_listings_group_id;
102 * foreign key to civicrm_group_id
106 public $add_to_group_id;
109 * Should a CAPTCHA widget be included this Profile form.
116 * Do we want to map results from this profile.
123 * Should edit link display in profile selector
127 public $is_edit_link;
130 * Should we display a link to the website profile in profile selector
137 * Should we update the contact record if we find a duplicate
141 public $is_update_dupe;
144 * Redirect to URL when Cancle button clik .
151 * Should we create a cms user for this profile
163 * Is this group reserved for use by some other CiviCRM functionality?
170 * Name of the UF group for directly addressing it in the codebase
177 * FK to civicrm_contact, who created this UF group
184 * Date and time this UF group was created.
188 public $created_date;
191 * Should we include proximity search feature in this profile search form?
195 public $is_proximity_search;
198 * Custom Text to display on the Cancel button when used in create or edit mode
202 public $cancel_button_text;
205 * Custom Text to display on the submit button on profile edit/create screens
209 public $submit_button_text;
212 * Should a Cancel button be included in this Profile form.
216 public $add_cancel_button;
221 public function __construct() {
222 $this->__table
= 'civicrm_uf_group';
223 parent
::__construct();
227 * Returns foreign keys and entity references.
230 * [CRM_Core_Reference_Interface]
232 public static function getReferenceColumns() {
233 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
234 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
235 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'limit_listings_group_id', 'civicrm_group', 'id');
236 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'add_to_group_id', 'civicrm_group', 'id');
237 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
238 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
240 return Civi
::$statics[__CLASS__
]['links'];
244 * Returns all the column names of this table
248 public static function &fields() {
249 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
250 Civi
::$statics[__CLASS__
]['fields'] = [
253 'type' => CRM_Utils_Type
::T_INT
,
254 'title' => ts('Profile ID'),
255 'description' => ts('Unique table ID'),
257 'where' => 'civicrm_uf_group.id',
258 'table_name' => 'civicrm_uf_group',
259 'entity' => 'UFGroup',
260 'bao' => 'CRM_Core_BAO_UFGroup',
264 'name' => 'is_active',
265 'type' => CRM_Utils_Type
::T_BOOLEAN
,
266 'title' => ts('Profile Is Active'),
267 'description' => ts('Is this form currently active? If false, hide all related fields for all sharing contexts.'),
268 'where' => 'civicrm_uf_group.is_active',
270 'table_name' => 'civicrm_uf_group',
271 'entity' => 'UFGroup',
272 'bao' => 'CRM_Core_BAO_UFGroup',
276 'name' => 'group_type',
277 'type' => CRM_Utils_Type
::T_STRING
,
278 'title' => ts('Profile Group Type'),
279 'description' => ts('Comma separated list of the type(s) of profile fields.'),
281 'size' => CRM_Utils_Type
::HUGE
,
283 'where' => 'civicrm_uf_group.group_type',
285 'table_name' => 'civicrm_uf_group',
286 'entity' => 'UFGroup',
287 'bao' => 'CRM_Core_BAO_UFGroup',
289 'serialize' => self
::SERIALIZE_COMMA
,
293 'type' => CRM_Utils_Type
::T_STRING
,
294 'title' => ts('Profile Name'),
295 'description' => ts('Form title.'),
298 'size' => CRM_Utils_Type
::BIG
,
299 'where' => 'civicrm_uf_group.title',
300 'table_name' => 'civicrm_uf_group',
301 'entity' => 'UFGroup',
302 'bao' => 'CRM_Core_BAO_UFGroup',
308 'frontend_title' => [
309 'name' => 'frontend_title',
310 'type' => CRM_Utils_Type
::T_STRING
,
311 'title' => ts('Public Title'),
312 'description' => ts('Profile Form Public title'),
314 'size' => CRM_Utils_Type
::BIG
,
315 'where' => 'civicrm_uf_group.frontend_title',
316 'table_name' => 'civicrm_uf_group',
317 'entity' => 'UFGroup',
318 'bao' => 'CRM_Core_BAO_UFGroup',
325 'name' => 'description',
326 'type' => CRM_Utils_Type
::T_TEXT
,
327 'title' => ts('Profile Description'),
328 'description' => ts('Optional verbose description of the profile.'),
331 'where' => 'civicrm_uf_group.description',
332 'table_name' => 'civicrm_uf_group',
333 'entity' => 'UFGroup',
334 'bao' => 'CRM_Core_BAO_UFGroup',
337 'type' => 'TextArea',
341 'name' => 'help_pre',
342 'type' => CRM_Utils_Type
::T_TEXT
,
343 'title' => ts('Help Pre'),
344 'description' => ts('Description and/or help text to display before fields in form.'),
347 'where' => 'civicrm_uf_group.help_pre',
348 'table_name' => 'civicrm_uf_group',
349 'entity' => 'UFGroup',
350 'bao' => 'CRM_Core_BAO_UFGroup',
353 'type' => 'TextArea',
357 'name' => 'help_post',
358 'type' => CRM_Utils_Type
::T_TEXT
,
359 'title' => ts('Profile Post Text'),
360 'description' => ts('Description and/or help text to display after fields in form.'),
363 'where' => 'civicrm_uf_group.help_post',
364 'table_name' => 'civicrm_uf_group',
365 'entity' => 'UFGroup',
366 'bao' => 'CRM_Core_BAO_UFGroup',
369 'type' => 'TextArea',
372 'limit_listings_group_id' => [
373 'name' => 'limit_listings_group_id',
374 'type' => CRM_Utils_Type
::T_INT
,
375 'title' => ts('Profile Search Limit Group'),
376 'description' => ts('Group id, foreign key from civicrm_group'),
377 'where' => 'civicrm_uf_group.limit_listings_group_id',
378 'table_name' => 'civicrm_uf_group',
379 'entity' => 'UFGroup',
380 'bao' => 'CRM_Core_BAO_UFGroup',
382 'FKClassName' => 'CRM_Contact_DAO_Group',
385 'name' => 'post_URL',
386 'type' => CRM_Utils_Type
::T_STRING
,
387 'title' => ts('Post Url'),
388 'description' => ts('Redirect to URL.'),
390 'size' => CRM_Utils_Type
::HUGE
,
391 'where' => 'civicrm_uf_group.post_URL',
392 'table_name' => 'civicrm_uf_group',
393 'entity' => 'UFGroup',
394 'bao' => 'CRM_Core_BAO_UFGroup',
397 'add_to_group_id' => [
398 'name' => 'add_to_group_id',
399 'type' => CRM_Utils_Type
::T_INT
,
400 'title' => ts('Add Contact To Group'),
401 'description' => ts('foreign key to civicrm_group_id'),
402 'where' => 'civicrm_uf_group.add_to_group_id',
403 'table_name' => 'civicrm_uf_group',
404 'entity' => 'UFGroup',
405 'bao' => 'CRM_Core_BAO_UFGroup',
407 'FKClassName' => 'CRM_Contact_DAO_Group',
410 'name' => 'add_captcha',
411 'type' => CRM_Utils_Type
::T_BOOLEAN
,
412 'title' => ts('Show Captcha On Profile'),
413 'description' => ts('Should a CAPTCHA widget be included this Profile form.'),
414 'where' => 'civicrm_uf_group.add_captcha',
416 'table_name' => 'civicrm_uf_group',
417 'entity' => 'UFGroup',
418 'bao' => 'CRM_Core_BAO_UFGroup',
423 'type' => CRM_Utils_Type
::T_BOOLEAN
,
424 'title' => ts('Map Profile'),
425 'description' => ts('Do we want to map results from this profile.'),
426 'where' => 'civicrm_uf_group.is_map',
428 'table_name' => 'civicrm_uf_group',
429 'entity' => 'UFGroup',
430 'bao' => 'CRM_Core_BAO_UFGroup',
434 'name' => 'is_edit_link',
435 'type' => CRM_Utils_Type
::T_BOOLEAN
,
436 'title' => ts('Show Edit Link?'),
437 'description' => ts('Should edit link display in profile selector'),
438 'where' => 'civicrm_uf_group.is_edit_link',
440 'table_name' => 'civicrm_uf_group',
441 'entity' => 'UFGroup',
442 'bao' => 'CRM_Core_BAO_UFGroup',
446 'name' => 'is_uf_link',
447 'type' => CRM_Utils_Type
::T_BOOLEAN
,
448 'title' => ts('Show Link to CMS User'),
449 'description' => ts('Should we display a link to the website profile in profile selector'),
450 'where' => 'civicrm_uf_group.is_uf_link',
452 'table_name' => 'civicrm_uf_group',
453 'entity' => 'UFGroup',
454 'bao' => 'CRM_Core_BAO_UFGroup',
457 'is_update_dupe' => [
458 'name' => 'is_update_dupe',
459 'type' => CRM_Utils_Type
::T_BOOLEAN
,
460 'title' => ts('Update on Duplicate'),
461 'description' => ts('Should we update the contact record if we find a duplicate'),
462 'where' => 'civicrm_uf_group.is_update_dupe',
464 'table_name' => 'civicrm_uf_group',
465 'entity' => 'UFGroup',
466 'bao' => 'CRM_Core_BAO_UFGroup',
470 'name' => 'cancel_URL',
471 'type' => CRM_Utils_Type
::T_STRING
,
472 'title' => ts('Profile Cancel URL'),
473 'description' => ts('Redirect to URL when Cancle button clik .'),
475 'size' => CRM_Utils_Type
::HUGE
,
476 'where' => 'civicrm_uf_group.cancel_URL',
477 'table_name' => 'civicrm_uf_group',
478 'entity' => 'UFGroup',
479 'bao' => 'CRM_Core_BAO_UFGroup',
483 'name' => 'is_cms_user',
484 'type' => CRM_Utils_Type
::T_BOOLEAN
,
485 'title' => ts('Create CMS User?'),
486 'description' => ts('Should we create a cms user for this profile '),
487 'where' => 'civicrm_uf_group.is_cms_user',
489 'table_name' => 'civicrm_uf_group',
490 'entity' => 'UFGroup',
491 'bao' => 'CRM_Core_BAO_UFGroup',
496 'type' => CRM_Utils_Type
::T_TEXT
,
497 'title' => ts('Notify on Profile Submit'),
498 'where' => 'civicrm_uf_group.notify',
499 'table_name' => 'civicrm_uf_group',
500 'entity' => 'UFGroup',
501 'bao' => 'CRM_Core_BAO_UFGroup',
505 'name' => 'is_reserved',
506 'type' => CRM_Utils_Type
::T_BOOLEAN
,
507 'title' => ts('Profile Is Reserved'),
508 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'),
509 'where' => 'civicrm_uf_group.is_reserved',
510 'table_name' => 'civicrm_uf_group',
511 'entity' => 'UFGroup',
512 'bao' => 'CRM_Core_BAO_UFGroup',
517 'type' => CRM_Utils_Type
::T_STRING
,
518 'title' => ts('Profile Name'),
519 'description' => ts('Name of the UF group for directly addressing it in the codebase'),
521 'size' => CRM_Utils_Type
::BIG
,
522 'where' => 'civicrm_uf_group.name',
523 'table_name' => 'civicrm_uf_group',
524 'entity' => 'UFGroup',
525 'bao' => 'CRM_Core_BAO_UFGroup',
529 'name' => 'created_id',
530 'type' => CRM_Utils_Type
::T_INT
,
531 'title' => ts('Profile Created By'),
532 'description' => ts('FK to civicrm_contact, who created this UF group'),
533 'where' => 'civicrm_uf_group.created_id',
534 'table_name' => 'civicrm_uf_group',
535 'entity' => 'UFGroup',
536 'bao' => 'CRM_Core_BAO_UFGroup',
538 'FKClassName' => 'CRM_Contact_DAO_Contact',
541 'name' => 'created_date',
542 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
543 'title' => ts('UF Group Created Date'),
544 'description' => ts('Date and time this UF group was created.'),
545 'where' => 'civicrm_uf_group.created_date',
546 'table_name' => 'civicrm_uf_group',
547 'entity' => 'UFGroup',
548 'bao' => 'CRM_Core_BAO_UFGroup',
551 'is_proximity_search' => [
552 'name' => 'is_proximity_search',
553 'type' => CRM_Utils_Type
::T_BOOLEAN
,
554 'title' => ts('Include Proximity Search?'),
555 'description' => ts('Should we include proximity search feature in this profile search form?'),
556 'where' => 'civicrm_uf_group.is_proximity_search',
558 'table_name' => 'civicrm_uf_group',
559 'entity' => 'UFGroup',
560 'bao' => 'CRM_Core_BAO_UFGroup',
563 'cancel_button_text' => [
564 'name' => 'cancel_button_text',
565 'type' => CRM_Utils_Type
::T_STRING
,
566 'title' => ts('Cancel Button Text'),
567 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'),
569 'size' => CRM_Utils_Type
::BIG
,
570 'where' => 'civicrm_uf_group.cancel_button_text',
572 'table_name' => 'civicrm_uf_group',
573 'entity' => 'UFGroup',
574 'bao' => 'CRM_Core_BAO_UFGroup',
580 'submit_button_text' => [
581 'name' => 'submit_button_text',
582 'type' => CRM_Utils_Type
::T_STRING
,
583 'title' => ts('Submit Button Text'),
584 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'),
586 'size' => CRM_Utils_Type
::BIG
,
587 'where' => 'civicrm_uf_group.submit_button_text',
589 'table_name' => 'civicrm_uf_group',
590 'entity' => 'UFGroup',
591 'bao' => 'CRM_Core_BAO_UFGroup',
597 'add_cancel_button' => [
598 'name' => 'add_cancel_button',
599 'type' => CRM_Utils_Type
::T_BOOLEAN
,
600 'title' => ts('Include Cancel Button'),
601 'description' => ts('Should a Cancel button be included in this Profile form.'),
602 'where' => 'civicrm_uf_group.add_cancel_button',
604 'table_name' => 'civicrm_uf_group',
605 'entity' => 'UFGroup',
606 'bao' => 'CRM_Core_BAO_UFGroup',
610 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
612 return Civi
::$statics[__CLASS__
]['fields'];
616 * Return a mapping from field-name to the corresponding key (as used in fields()).
619 * Array(string $name => string $uniqueName).
621 public static function &fieldKeys() {
622 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
623 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
625 return Civi
::$statics[__CLASS__
]['fieldKeys'];
629 * Returns the names of this table
633 public static function getTableName() {
634 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
638 * Returns if this table needs to be logged
642 public function getLog() {
647 * Returns the list of fields that can be imported
649 * @param bool $prefix
653 public static function &import($prefix = FALSE) {
654 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
659 * Returns the list of fields that can be exported
661 * @param bool $prefix
665 public static function &export($prefix = FALSE) {
666 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
671 * Returns the list of indices
673 * @param bool $localize
677 public static function indices($localize = TRUE) {
684 'localizable' => FALSE,
686 'sig' => 'civicrm_uf_group::1::name',
689 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;