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' => 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('Title'),
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',
304 'frontend_title' => [
305 'name' => 'frontend_title',
306 'type' => CRM_Utils_Type
::T_STRING
,
307 'title' => ts('Frontend Title'),
308 'description' => ts('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' => ts('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' => ts('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' => ts('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' => ts('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' => ts('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' => ts('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' => ts('Should a CAPTCHA widget be included this Profile form.'),
401 'table_name' => 'civicrm_uf_group',
402 'entity' => 'UFGroup',
403 'bao' => 'CRM_Core_BAO_UFGroup',
408 'type' => CRM_Utils_Type
::T_BOOLEAN
,
409 'title' => ts('Map Profile'),
410 'description' => ts('Do we want to map results from this profile.'),
412 'table_name' => 'civicrm_uf_group',
413 'entity' => 'UFGroup',
414 'bao' => 'CRM_Core_BAO_UFGroup',
418 'name' => 'is_edit_link',
419 'type' => CRM_Utils_Type
::T_BOOLEAN
,
420 'title' => ts('Show Edit Link?'),
421 'description' => ts('Should edit link display in profile selector'),
423 'table_name' => 'civicrm_uf_group',
424 'entity' => 'UFGroup',
425 'bao' => 'CRM_Core_BAO_UFGroup',
429 'name' => 'is_uf_link',
430 'type' => CRM_Utils_Type
::T_BOOLEAN
,
431 'title' => ts('Show Link to CMS User'),
432 'description' => ts('Should we display a link to the website profile in profile selector'),
434 'table_name' => 'civicrm_uf_group',
435 'entity' => 'UFGroup',
436 'bao' => 'CRM_Core_BAO_UFGroup',
439 'is_update_dupe' => [
440 'name' => 'is_update_dupe',
441 'type' => CRM_Utils_Type
::T_BOOLEAN
,
442 'title' => ts('Update on Duplicate'),
443 'description' => ts('Should we update the contact record if we find a duplicate'),
445 'table_name' => 'civicrm_uf_group',
446 'entity' => 'UFGroup',
447 'bao' => 'CRM_Core_BAO_UFGroup',
451 'name' => 'cancel_URL',
452 'type' => CRM_Utils_Type
::T_STRING
,
453 'title' => ts('Profile Cancel URL'),
454 'description' => ts('Redirect to URL when Cancle button clik .'),
456 'size' => CRM_Utils_Type
::HUGE
,
457 'table_name' => 'civicrm_uf_group',
458 'entity' => 'UFGroup',
459 'bao' => 'CRM_Core_BAO_UFGroup',
463 'name' => 'is_cms_user',
464 'type' => CRM_Utils_Type
::T_BOOLEAN
,
465 'title' => ts('Create CMS User?'),
466 'description' => ts('Should we create a cms user for this profile '),
468 'table_name' => 'civicrm_uf_group',
469 'entity' => 'UFGroup',
470 'bao' => 'CRM_Core_BAO_UFGroup',
475 'type' => CRM_Utils_Type
::T_TEXT
,
476 'title' => ts('Notify on Profile Submit'),
477 'table_name' => 'civicrm_uf_group',
478 'entity' => 'UFGroup',
479 'bao' => 'CRM_Core_BAO_UFGroup',
483 'name' => 'is_reserved',
484 'type' => CRM_Utils_Type
::T_BOOLEAN
,
485 'title' => ts('Profile Is Reserved'),
486 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'),
487 'table_name' => 'civicrm_uf_group',
488 'entity' => 'UFGroup',
489 'bao' => 'CRM_Core_BAO_UFGroup',
494 'type' => CRM_Utils_Type
::T_STRING
,
495 'title' => ts('Profile Name'),
496 'description' => ts('Name of the UF group for directly addressing it in the codebase'),
498 'size' => CRM_Utils_Type
::BIG
,
499 'table_name' => 'civicrm_uf_group',
500 'entity' => 'UFGroup',
501 'bao' => 'CRM_Core_BAO_UFGroup',
505 'name' => 'created_id',
506 'type' => CRM_Utils_Type
::T_INT
,
507 'title' => ts('Profile Created By'),
508 'description' => ts('FK to civicrm_contact, who created this UF group'),
509 'table_name' => 'civicrm_uf_group',
510 'entity' => 'UFGroup',
511 'bao' => 'CRM_Core_BAO_UFGroup',
513 'FKClassName' => 'CRM_Contact_DAO_Contact',
516 'name' => 'created_date',
517 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
518 'title' => ts('UF Group Created Date'),
519 'description' => ts('Date and time this UF group was created.'),
520 'table_name' => 'civicrm_uf_group',
521 'entity' => 'UFGroup',
522 'bao' => 'CRM_Core_BAO_UFGroup',
525 'is_proximity_search' => [
526 'name' => 'is_proximity_search',
527 'type' => CRM_Utils_Type
::T_BOOLEAN
,
528 'title' => ts('Include Proximity Search?'),
529 'description' => ts('Should we include proximity search feature in this profile search form?'),
531 'table_name' => 'civicrm_uf_group',
532 'entity' => 'UFGroup',
533 'bao' => 'CRM_Core_BAO_UFGroup',
536 'cancel_button_text' => [
537 'name' => 'cancel_button_text',
538 'type' => CRM_Utils_Type
::T_STRING
,
539 'title' => ts('Cancel Button Text'),
540 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'),
542 'size' => CRM_Utils_Type
::BIG
,
544 'table_name' => 'civicrm_uf_group',
545 'entity' => 'UFGroup',
546 'bao' => 'CRM_Core_BAO_UFGroup',
549 'submit_button_text' => [
550 'name' => 'submit_button_text',
551 'type' => CRM_Utils_Type
::T_STRING
,
552 'title' => ts('Submit Button Text'),
553 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'),
555 'size' => CRM_Utils_Type
::BIG
,
557 'table_name' => 'civicrm_uf_group',
558 'entity' => 'UFGroup',
559 'bao' => 'CRM_Core_BAO_UFGroup',
562 'add_cancel_button' => [
563 'name' => 'add_cancel_button',
564 'type' => CRM_Utils_Type
::T_BOOLEAN
,
565 'title' => ts('Include Cancel Button'),
566 'description' => ts('Should a Cancel button be included in this Profile form.'),
568 'table_name' => 'civicrm_uf_group',
569 'entity' => 'UFGroup',
570 'bao' => 'CRM_Core_BAO_UFGroup',
574 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
576 return Civi
::$statics[__CLASS__
]['fields'];
580 * Return a mapping from field-name to the corresponding key (as used in fields()).
583 * Array(string $name => string $uniqueName).
585 public static function &fieldKeys() {
586 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
587 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
589 return Civi
::$statics[__CLASS__
]['fieldKeys'];
593 * Returns the names of this table
597 public static function getTableName() {
598 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
602 * Returns if this table needs to be logged
606 public function getLog() {
611 * Returns the list of fields that can be imported
613 * @param bool $prefix
617 public static function &import($prefix = FALSE) {
618 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
623 * Returns the list of fields that can be exported
625 * @param bool $prefix
629 public static function &export($prefix = FALSE) {
630 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
635 * Returns the list of indices
637 * @param bool $localize
641 public static function indices($localize = TRUE) {
648 'localizable' => FALSE,
650 'sig' => 'civicrm_uf_group::1::name',
653 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;