5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/UFGroup.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:a48f9522d0bd2e1d485064ebfc66f9a2)
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 static $_tableName = 'civicrm_uf_group';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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' => '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' => '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' => '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('Title'),
295 'description' => 'Form title.',
298 'size' => CRM_Utils_Type
::BIG
,
299 'table_name' => 'civicrm_uf_group',
300 'entity' => 'UFGroup',
301 'bao' => 'CRM_Core_BAO_UFGroup',
304 'frontend_title' => [
305 'name' => 'frontend_title',
306 'type' => CRM_Utils_Type
::T_STRING
,
307 'title' => ts('Frontend Title'),
308 'description' => 'Profile Form Public title',
310 'size' => CRM_Utils_Type
::BIG
,
311 'table_name' => 'civicrm_uf_group',
312 'entity' => 'UFGroup',
313 'bao' => 'CRM_Core_BAO_UFGroup',
317 'name' => 'description',
318 'type' => CRM_Utils_Type
::T_TEXT
,
319 'title' => ts('Profile Description'),
320 'description' => 'Optional verbose description of the profile.',
323 'table_name' => 'civicrm_uf_group',
324 'entity' => 'UFGroup',
325 'bao' => 'CRM_Core_BAO_UFGroup',
328 'type' => 'TextArea',
332 'name' => 'help_pre',
333 'type' => CRM_Utils_Type
::T_TEXT
,
334 'title' => ts('Help Pre'),
335 'description' => 'Description and/or help text to display before fields in form.',
338 'table_name' => 'civicrm_uf_group',
339 'entity' => 'UFGroup',
340 'bao' => 'CRM_Core_BAO_UFGroup',
343 'type' => 'TextArea',
347 'name' => 'help_post',
348 'type' => CRM_Utils_Type
::T_TEXT
,
349 'title' => ts('Profile Post Text'),
350 'description' => 'Description and/or help text to display after fields in form.',
353 'table_name' => 'civicrm_uf_group',
354 'entity' => 'UFGroup',
355 'bao' => 'CRM_Core_BAO_UFGroup',
358 'type' => 'TextArea',
361 'limit_listings_group_id' => [
362 'name' => 'limit_listings_group_id',
363 'type' => CRM_Utils_Type
::T_INT
,
364 'title' => ts('Profile Search Limit Group'),
365 'description' => 'Group id, foreign key from civicrm_group',
366 'table_name' => 'civicrm_uf_group',
367 'entity' => 'UFGroup',
368 'bao' => 'CRM_Core_BAO_UFGroup',
370 'FKClassName' => 'CRM_Contact_DAO_Group',
373 'name' => 'post_URL',
374 'type' => CRM_Utils_Type
::T_STRING
,
375 'title' => ts('Post Url'),
376 'description' => 'Redirect to URL.',
378 'size' => CRM_Utils_Type
::HUGE
,
379 'table_name' => 'civicrm_uf_group',
380 'entity' => 'UFGroup',
381 'bao' => 'CRM_Core_BAO_UFGroup',
384 'add_to_group_id' => [
385 'name' => 'add_to_group_id',
386 'type' => CRM_Utils_Type
::T_INT
,
387 'title' => ts('Add Contact To Group'),
388 'description' => 'foreign key to civicrm_group_id',
389 'table_name' => 'civicrm_uf_group',
390 'entity' => 'UFGroup',
391 'bao' => 'CRM_Core_BAO_UFGroup',
393 'FKClassName' => 'CRM_Contact_DAO_Group',
396 'name' => 'add_captcha',
397 'type' => CRM_Utils_Type
::T_BOOLEAN
,
398 'title' => ts('Show Captcha On Profile'),
399 'description' => 'Should a CAPTCHA widget be included this Profile form.',
400 'table_name' => 'civicrm_uf_group',
401 'entity' => 'UFGroup',
402 'bao' => 'CRM_Core_BAO_UFGroup',
407 'type' => CRM_Utils_Type
::T_BOOLEAN
,
408 'title' => ts('Map Profile'),
409 'description' => 'Do we want to map results from this profile.',
410 'table_name' => 'civicrm_uf_group',
411 'entity' => 'UFGroup',
412 'bao' => 'CRM_Core_BAO_UFGroup',
416 'name' => 'is_edit_link',
417 'type' => CRM_Utils_Type
::T_BOOLEAN
,
418 'title' => ts('Show Edit Link?'),
419 'description' => 'Should edit link display in profile selector',
420 'table_name' => 'civicrm_uf_group',
421 'entity' => 'UFGroup',
422 'bao' => 'CRM_Core_BAO_UFGroup',
426 'name' => 'is_uf_link',
427 'type' => CRM_Utils_Type
::T_BOOLEAN
,
428 'title' => ts('Show Link to CMS User'),
429 'description' => 'Should we display a link to the website profile in profile selector',
430 'table_name' => 'civicrm_uf_group',
431 'entity' => 'UFGroup',
432 'bao' => 'CRM_Core_BAO_UFGroup',
435 'is_update_dupe' => [
436 'name' => 'is_update_dupe',
437 'type' => CRM_Utils_Type
::T_BOOLEAN
,
438 'title' => ts('Update on Duplicate'),
439 'description' => 'Should we update the contact record if we find a duplicate',
440 'table_name' => 'civicrm_uf_group',
441 'entity' => 'UFGroup',
442 'bao' => 'CRM_Core_BAO_UFGroup',
446 'name' => 'cancel_URL',
447 'type' => CRM_Utils_Type
::T_STRING
,
448 'title' => ts('Profile Cancel URL'),
449 'description' => 'Redirect to URL when Cancle button clik .',
451 'size' => CRM_Utils_Type
::HUGE
,
452 'table_name' => 'civicrm_uf_group',
453 'entity' => 'UFGroup',
454 'bao' => 'CRM_Core_BAO_UFGroup',
458 'name' => 'is_cms_user',
459 'type' => CRM_Utils_Type
::T_BOOLEAN
,
460 'title' => ts('Create CMS User?'),
461 'description' => 'Should we create a cms user for this profile ',
462 'table_name' => 'civicrm_uf_group',
463 'entity' => 'UFGroup',
464 'bao' => 'CRM_Core_BAO_UFGroup',
469 'type' => CRM_Utils_Type
::T_TEXT
,
470 'title' => ts('Notify on Profile Submit'),
471 'table_name' => 'civicrm_uf_group',
472 'entity' => 'UFGroup',
473 'bao' => 'CRM_Core_BAO_UFGroup',
477 'name' => 'is_reserved',
478 'type' => CRM_Utils_Type
::T_BOOLEAN
,
479 'title' => ts('Profile Is Reserved'),
480 'description' => 'Is this group reserved for use by some other CiviCRM functionality?',
481 'table_name' => 'civicrm_uf_group',
482 'entity' => 'UFGroup',
483 'bao' => 'CRM_Core_BAO_UFGroup',
488 'type' => CRM_Utils_Type
::T_STRING
,
489 'title' => ts('Profile Name'),
490 'description' => 'Name of the UF group for directly addressing it in the codebase',
492 'size' => CRM_Utils_Type
::BIG
,
493 'table_name' => 'civicrm_uf_group',
494 'entity' => 'UFGroup',
495 'bao' => 'CRM_Core_BAO_UFGroup',
499 'name' => 'created_id',
500 'type' => CRM_Utils_Type
::T_INT
,
501 'title' => ts('Profile Created By'),
502 'description' => 'FK to civicrm_contact, who created this UF group',
503 'table_name' => 'civicrm_uf_group',
504 'entity' => 'UFGroup',
505 'bao' => 'CRM_Core_BAO_UFGroup',
507 'FKClassName' => 'CRM_Contact_DAO_Contact',
510 'name' => 'created_date',
511 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
512 'title' => ts('UF Group Created Date'),
513 'description' => 'Date and time this UF group was created.',
514 'table_name' => 'civicrm_uf_group',
515 'entity' => 'UFGroup',
516 'bao' => 'CRM_Core_BAO_UFGroup',
519 'is_proximity_search' => [
520 'name' => 'is_proximity_search',
521 'type' => CRM_Utils_Type
::T_BOOLEAN
,
522 'title' => ts('Include Proximity Search?'),
523 'description' => 'Should we include proximity search feature in this profile search form?',
524 'table_name' => 'civicrm_uf_group',
525 'entity' => 'UFGroup',
526 'bao' => 'CRM_Core_BAO_UFGroup',
529 'cancel_button_text' => [
530 'name' => 'cancel_button_text',
531 'type' => CRM_Utils_Type
::T_STRING
,
532 'title' => ts('Cancel Button Text'),
533 'description' => 'Custom Text to display on the Cancel button when used in create or edit mode',
535 'size' => CRM_Utils_Type
::BIG
,
537 'table_name' => 'civicrm_uf_group',
538 'entity' => 'UFGroup',
539 'bao' => 'CRM_Core_BAO_UFGroup',
542 'submit_button_text' => [
543 'name' => 'submit_button_text',
544 'type' => CRM_Utils_Type
::T_STRING
,
545 'title' => ts('Submit Button Text'),
546 'description' => 'Custom Text to display on the submit button on profile edit/create screens',
548 'size' => CRM_Utils_Type
::BIG
,
550 'table_name' => 'civicrm_uf_group',
551 'entity' => 'UFGroup',
552 'bao' => 'CRM_Core_BAO_UFGroup',
555 'add_cancel_button' => [
556 'name' => 'add_cancel_button',
557 'type' => CRM_Utils_Type
::T_BOOLEAN
,
558 'title' => ts('Include Cancel Button'),
559 'description' => 'Should a Cancel button be included in this Profile form.',
561 'table_name' => 'civicrm_uf_group',
562 'entity' => 'UFGroup',
563 'bao' => 'CRM_Core_BAO_UFGroup',
567 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
569 return Civi
::$statics[__CLASS__
]['fields'];
573 * Return a mapping from field-name to the corresponding key (as used in fields()).
576 * Array(string $name => string $uniqueName).
578 public static function &fieldKeys() {
579 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
580 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
582 return Civi
::$statics[__CLASS__
]['fieldKeys'];
586 * Returns the names of this table
590 public static function getTableName() {
591 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
595 * Returns if this table needs to be logged
599 public function getLog() {
604 * Returns the list of fields that can be imported
606 * @param bool $prefix
610 public static function &import($prefix = FALSE) {
611 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
616 * Returns the list of fields that can be exported
618 * @param bool $prefix
622 public static function &export($prefix = FALSE) {
623 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
628 * Returns the list of indices
630 * @param bool $localize
634 public static function indices($localize = TRUE) {
641 'localizable' => FALSE,
643 'sig' => 'civicrm_uf_group::1::name',
646 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;