5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Core/UFGroup.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:0f78fb49440e1cf5d43fd3db5a43ee7e)
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 'table_name' => 'civicrm_uf_group',
258 'entity' => 'UFGroup',
259 'bao' => 'CRM_Core_BAO_UFGroup',
263 'name' => 'is_active',
264 'type' => CRM_Utils_Type
::T_BOOLEAN
,
265 'title' => ts('Profile Is Active'),
266 'description' => ts('Is this form currently active? If false, hide all related fields for all sharing contexts.'),
268 'table_name' => 'civicrm_uf_group',
269 'entity' => 'UFGroup',
270 'bao' => 'CRM_Core_BAO_UFGroup',
274 'name' => 'group_type',
275 'type' => CRM_Utils_Type
::T_STRING
,
276 'title' => ts('Profile Group Type'),
277 'description' => ts('Comma separated list of the type(s) of profile fields.'),
279 'size' => CRM_Utils_Type
::HUGE
,
281 'where' => 'civicrm_uf_group.group_type',
282 'headerPattern' => '',
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 'table_name' => 'civicrm_uf_group',
300 'entity' => 'UFGroup',
301 'bao' => 'CRM_Core_BAO_UFGroup',
307 'frontend_title' => [
308 'name' => 'frontend_title',
309 'type' => CRM_Utils_Type
::T_STRING
,
310 'title' => ts('Public Title'),
311 'description' => ts('Profile Form Public title'),
313 'size' => CRM_Utils_Type
::BIG
,
314 'table_name' => 'civicrm_uf_group',
315 'entity' => 'UFGroup',
316 'bao' => 'CRM_Core_BAO_UFGroup',
323 'name' => 'description',
324 'type' => CRM_Utils_Type
::T_TEXT
,
325 'title' => ts('Profile Description'),
326 'description' => ts('Optional verbose description of the profile.'),
329 'table_name' => 'civicrm_uf_group',
330 'entity' => 'UFGroup',
331 'bao' => 'CRM_Core_BAO_UFGroup',
334 'type' => 'TextArea',
338 'name' => 'help_pre',
339 'type' => CRM_Utils_Type
::T_TEXT
,
340 'title' => ts('Help Pre'),
341 'description' => ts('Description and/or help text to display before fields in form.'),
344 'table_name' => 'civicrm_uf_group',
345 'entity' => 'UFGroup',
346 'bao' => 'CRM_Core_BAO_UFGroup',
349 'type' => 'TextArea',
353 'name' => 'help_post',
354 'type' => CRM_Utils_Type
::T_TEXT
,
355 'title' => ts('Profile Post Text'),
356 'description' => ts('Description and/or help text to display after fields in form.'),
359 'table_name' => 'civicrm_uf_group',
360 'entity' => 'UFGroup',
361 'bao' => 'CRM_Core_BAO_UFGroup',
364 'type' => 'TextArea',
367 'limit_listings_group_id' => [
368 'name' => 'limit_listings_group_id',
369 'type' => CRM_Utils_Type
::T_INT
,
370 'title' => ts('Profile Search Limit Group'),
371 'description' => ts('Group id, foreign key from civicrm_group'),
372 'table_name' => 'civicrm_uf_group',
373 'entity' => 'UFGroup',
374 'bao' => 'CRM_Core_BAO_UFGroup',
376 'FKClassName' => 'CRM_Contact_DAO_Group',
379 'name' => 'post_URL',
380 'type' => CRM_Utils_Type
::T_STRING
,
381 'title' => ts('Post Url'),
382 'description' => ts('Redirect to URL.'),
384 'size' => CRM_Utils_Type
::HUGE
,
385 'table_name' => 'civicrm_uf_group',
386 'entity' => 'UFGroup',
387 'bao' => 'CRM_Core_BAO_UFGroup',
390 'add_to_group_id' => [
391 'name' => 'add_to_group_id',
392 'type' => CRM_Utils_Type
::T_INT
,
393 'title' => ts('Add Contact To Group'),
394 'description' => ts('foreign key to civicrm_group_id'),
395 'table_name' => 'civicrm_uf_group',
396 'entity' => 'UFGroup',
397 'bao' => 'CRM_Core_BAO_UFGroup',
399 'FKClassName' => 'CRM_Contact_DAO_Group',
402 'name' => 'add_captcha',
403 'type' => CRM_Utils_Type
::T_BOOLEAN
,
404 'title' => ts('Show Captcha On Profile'),
405 'description' => ts('Should a CAPTCHA widget be included this Profile form.'),
407 'table_name' => 'civicrm_uf_group',
408 'entity' => 'UFGroup',
409 'bao' => 'CRM_Core_BAO_UFGroup',
414 'type' => CRM_Utils_Type
::T_BOOLEAN
,
415 'title' => ts('Map Profile'),
416 'description' => ts('Do we want to map results from this profile.'),
418 'table_name' => 'civicrm_uf_group',
419 'entity' => 'UFGroup',
420 'bao' => 'CRM_Core_BAO_UFGroup',
424 'name' => 'is_edit_link',
425 'type' => CRM_Utils_Type
::T_BOOLEAN
,
426 'title' => ts('Show Edit Link?'),
427 'description' => ts('Should edit link display in profile selector'),
429 'table_name' => 'civicrm_uf_group',
430 'entity' => 'UFGroup',
431 'bao' => 'CRM_Core_BAO_UFGroup',
435 'name' => 'is_uf_link',
436 'type' => CRM_Utils_Type
::T_BOOLEAN
,
437 'title' => ts('Show Link to CMS User'),
438 'description' => ts('Should we display a link to the website profile in profile selector'),
440 'table_name' => 'civicrm_uf_group',
441 'entity' => 'UFGroup',
442 'bao' => 'CRM_Core_BAO_UFGroup',
445 'is_update_dupe' => [
446 'name' => 'is_update_dupe',
447 'type' => CRM_Utils_Type
::T_BOOLEAN
,
448 'title' => ts('Update on Duplicate'),
449 'description' => ts('Should we update the contact record if we find a duplicate'),
451 'table_name' => 'civicrm_uf_group',
452 'entity' => 'UFGroup',
453 'bao' => 'CRM_Core_BAO_UFGroup',
457 'name' => 'cancel_URL',
458 'type' => CRM_Utils_Type
::T_STRING
,
459 'title' => ts('Profile Cancel URL'),
460 'description' => ts('Redirect to URL when Cancle button clik .'),
462 'size' => CRM_Utils_Type
::HUGE
,
463 'table_name' => 'civicrm_uf_group',
464 'entity' => 'UFGroup',
465 'bao' => 'CRM_Core_BAO_UFGroup',
469 'name' => 'is_cms_user',
470 'type' => CRM_Utils_Type
::T_BOOLEAN
,
471 'title' => ts('Create CMS User?'),
472 'description' => ts('Should we create a cms user for this profile '),
474 'table_name' => 'civicrm_uf_group',
475 'entity' => 'UFGroup',
476 'bao' => 'CRM_Core_BAO_UFGroup',
481 'type' => CRM_Utils_Type
::T_TEXT
,
482 'title' => ts('Notify on Profile Submit'),
483 'table_name' => 'civicrm_uf_group',
484 'entity' => 'UFGroup',
485 'bao' => 'CRM_Core_BAO_UFGroup',
489 'name' => 'is_reserved',
490 'type' => CRM_Utils_Type
::T_BOOLEAN
,
491 'title' => ts('Profile Is Reserved'),
492 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'),
493 'table_name' => 'civicrm_uf_group',
494 'entity' => 'UFGroup',
495 'bao' => 'CRM_Core_BAO_UFGroup',
500 'type' => CRM_Utils_Type
::T_STRING
,
501 'title' => ts('Profile Name'),
502 'description' => ts('Name of the UF group for directly addressing it in the codebase'),
504 'size' => CRM_Utils_Type
::BIG
,
505 'table_name' => 'civicrm_uf_group',
506 'entity' => 'UFGroup',
507 'bao' => 'CRM_Core_BAO_UFGroup',
511 'name' => 'created_id',
512 'type' => CRM_Utils_Type
::T_INT
,
513 'title' => ts('Profile Created By'),
514 'description' => ts('FK to civicrm_contact, who created this UF group'),
515 'table_name' => 'civicrm_uf_group',
516 'entity' => 'UFGroup',
517 'bao' => 'CRM_Core_BAO_UFGroup',
519 'FKClassName' => 'CRM_Contact_DAO_Contact',
522 'name' => 'created_date',
523 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
524 'title' => ts('UF Group Created Date'),
525 'description' => ts('Date and time this UF group was created.'),
526 'table_name' => 'civicrm_uf_group',
527 'entity' => 'UFGroup',
528 'bao' => 'CRM_Core_BAO_UFGroup',
531 'is_proximity_search' => [
532 'name' => 'is_proximity_search',
533 'type' => CRM_Utils_Type
::T_BOOLEAN
,
534 'title' => ts('Include Proximity Search?'),
535 'description' => ts('Should we include proximity search feature in this profile search form?'),
537 'table_name' => 'civicrm_uf_group',
538 'entity' => 'UFGroup',
539 'bao' => 'CRM_Core_BAO_UFGroup',
542 'cancel_button_text' => [
543 'name' => 'cancel_button_text',
544 'type' => CRM_Utils_Type
::T_STRING
,
545 'title' => ts('Cancel Button Text'),
546 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'),
548 'size' => CRM_Utils_Type
::BIG
,
550 'table_name' => 'civicrm_uf_group',
551 'entity' => 'UFGroup',
552 'bao' => 'CRM_Core_BAO_UFGroup',
558 'submit_button_text' => [
559 'name' => 'submit_button_text',
560 'type' => CRM_Utils_Type
::T_STRING
,
561 'title' => ts('Submit Button Text'),
562 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'),
564 'size' => CRM_Utils_Type
::BIG
,
566 'table_name' => 'civicrm_uf_group',
567 'entity' => 'UFGroup',
568 'bao' => 'CRM_Core_BAO_UFGroup',
574 'add_cancel_button' => [
575 'name' => 'add_cancel_button',
576 'type' => CRM_Utils_Type
::T_BOOLEAN
,
577 'title' => ts('Include Cancel Button'),
578 'description' => ts('Should a Cancel button be included in this Profile form.'),
580 'table_name' => 'civicrm_uf_group',
581 'entity' => 'UFGroup',
582 'bao' => 'CRM_Core_BAO_UFGroup',
586 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
588 return Civi
::$statics[__CLASS__
]['fields'];
592 * Return a mapping from field-name to the corresponding key (as used in fields()).
595 * Array(string $name => string $uniqueName).
597 public static function &fieldKeys() {
598 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
599 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
601 return Civi
::$statics[__CLASS__
]['fieldKeys'];
605 * Returns the names of this table
609 public static function getTableName() {
610 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
614 * Returns if this table needs to be logged
618 public function getLog() {
623 * Returns the list of fields that can be imported
625 * @param bool $prefix
629 public static function &import($prefix = FALSE) {
630 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
635 * Returns the list of fields that can be exported
637 * @param bool $prefix
641 public static function &export($prefix = FALSE) {
642 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
647 * Returns the list of indices
649 * @param bool $localize
653 public static function indices($localize = TRUE) {
660 'localizable' => FALSE,
662 'sig' => 'civicrm_uf_group::1::name',
665 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;