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:e33df676b4e3ae50e18f1c44e437e3ea)
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',
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',
283 'table_name' => 'civicrm_uf_group',
284 'entity' => 'UFGroup',
285 'bao' => 'CRM_Core_BAO_UFGroup',
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.'),
295 'size' => CRM_Utils_Type
::HUGE
,
297 'where' => 'civicrm_uf_group.group_type',
299 'table_name' => 'civicrm_uf_group',
300 'entity' => 'UFGroup',
301 'bao' => 'CRM_Core_BAO_UFGroup',
303 'serialize' => self
::SERIALIZE_COMMA
,
308 'type' => CRM_Utils_Type
::T_STRING
,
309 'title' => ts('Profile Name'),
310 'description' => ts('Form title.'),
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',
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'),
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',
342 'name' => 'description',
343 'type' => CRM_Utils_Type
::T_TEXT
,
344 'title' => ts('Profile Description'),
345 'description' => ts('Optional verbose description of the profile.'),
348 'where' => 'civicrm_uf_group.description',
349 'table_name' => 'civicrm_uf_group',
350 'entity' => 'UFGroup',
351 'bao' => 'CRM_Core_BAO_UFGroup',
354 'type' => 'TextArea',
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.'),
365 'where' => 'civicrm_uf_group.help_pre',
366 'table_name' => 'civicrm_uf_group',
367 'entity' => 'UFGroup',
368 'bao' => 'CRM_Core_BAO_UFGroup',
371 'type' => 'TextArea',
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.'),
382 'where' => 'civicrm_uf_group.help_post',
383 'table_name' => 'civicrm_uf_group',
384 'entity' => 'UFGroup',
385 'bao' => 'CRM_Core_BAO_UFGroup',
388 'type' => 'TextArea',
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',
402 'FKClassName' => 'CRM_Contact_DAO_Group',
406 'name' => 'post_URL',
407 'type' => CRM_Utils_Type
::T_STRING
,
408 'title' => ts('Post Url'),
409 'description' => ts('Redirect to URL.'),
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',
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',
429 'FKClassName' => 'CRM_Contact_DAO_Group',
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',
439 'table_name' => 'civicrm_uf_group',
440 'entity' => 'UFGroup',
441 'bao' => 'CRM_Core_BAO_UFGroup',
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',
452 'table_name' => 'civicrm_uf_group',
453 'entity' => 'UFGroup',
454 'bao' => 'CRM_Core_BAO_UFGroup',
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',
465 'table_name' => 'civicrm_uf_group',
466 'entity' => 'UFGroup',
467 'bao' => 'CRM_Core_BAO_UFGroup',
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',
478 'table_name' => 'civicrm_uf_group',
479 'entity' => 'UFGroup',
480 'bao' => 'CRM_Core_BAO_UFGroup',
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',
491 'table_name' => 'civicrm_uf_group',
492 'entity' => 'UFGroup',
493 'bao' => 'CRM_Core_BAO_UFGroup',
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 .'),
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',
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',
518 'table_name' => 'civicrm_uf_group',
519 'entity' => 'UFGroup',
520 'bao' => 'CRM_Core_BAO_UFGroup',
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',
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',
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'),
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',
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',
571 'FKClassName' => 'CRM_Contact_DAO_Contact',
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',
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',
593 'table_name' => 'civicrm_uf_group',
594 'entity' => 'UFGroup',
595 'bao' => 'CRM_Core_BAO_UFGroup',
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'),
605 'size' => CRM_Utils_Type
::BIG
,
606 'where' => 'civicrm_uf_group.cancel_button_text',
608 'table_name' => 'civicrm_uf_group',
609 'entity' => 'UFGroup',
610 'bao' => 'CRM_Core_BAO_UFGroup',
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'),
623 'size' => CRM_Utils_Type
::BIG
,
624 'where' => 'civicrm_uf_group.submit_button_text',
626 'table_name' => 'civicrm_uf_group',
627 'entity' => 'UFGroup',
628 'bao' => 'CRM_Core_BAO_UFGroup',
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',
642 'table_name' => 'civicrm_uf_group',
643 'entity' => 'UFGroup',
644 'bao' => 'CRM_Core_BAO_UFGroup',
649 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
651 return Civi
::$statics[__CLASS__
]['fields'];
655 * Return a mapping from field-name to the corresponding key (as used in fields()).
658 * Array(string $name => string $uniqueName).
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()));
664 return Civi
::$statics[__CLASS__
]['fieldKeys'];
668 * Returns the names of this table
672 public static function getTableName() {
673 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
677 * Returns if this table needs to be logged
681 public function getLog() {
686 * Returns the list of fields that can be imported
688 * @param bool $prefix
692 public static function &import($prefix = FALSE) {
693 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
698 * Returns the list of fields that can be exported
700 * @param bool $prefix
704 public static function &export($prefix = FALSE) {
705 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
710 * Returns the list of indices
712 * @param bool $localize
716 public static function indices($localize = TRUE) {
723 'localizable' => FALSE,
725 'sig' => 'civicrm_uf_group::1::name',
728 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;