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:a6776694df1be240b3f7be798792175d)
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;
214 public function __construct() {
215 $this->__table
= 'civicrm_uf_group';
216 parent
::__construct();
220 * Returns foreign keys and entity references.
223 * [CRM_Core_Reference_Interface]
225 public static function getReferenceColumns() {
226 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
227 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
228 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'limit_listings_group_id', 'civicrm_group', 'id');
229 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'add_to_group_id', 'civicrm_group', 'id');
230 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
231 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
233 return Civi
::$statics[__CLASS__
]['links'];
237 * Returns all the column names of this table
241 public static function &fields() {
242 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
243 Civi
::$statics[__CLASS__
]['fields'] = [
246 'type' => CRM_Utils_Type
::T_INT
,
247 'title' => ts('Profile ID'),
248 'description' => 'Unique table ID',
250 'table_name' => 'civicrm_uf_group',
251 'entity' => 'UFGroup',
252 'bao' => 'CRM_Core_BAO_UFGroup',
256 'name' => 'is_active',
257 'type' => CRM_Utils_Type
::T_BOOLEAN
,
258 'title' => ts('Profile Is Active'),
259 'description' => 'Is this form currently active? If false, hide all related fields for all sharing contexts.',
261 'table_name' => 'civicrm_uf_group',
262 'entity' => 'UFGroup',
263 'bao' => 'CRM_Core_BAO_UFGroup',
267 'name' => 'group_type',
268 'type' => CRM_Utils_Type
::T_STRING
,
269 'title' => ts('Profile Group Type'),
270 'description' => 'Comma separated list of the type(s) of profile fields.',
272 'size' => CRM_Utils_Type
::HUGE
,
274 'where' => 'civicrm_uf_group.group_type',
275 'headerPattern' => '',
278 'table_name' => 'civicrm_uf_group',
279 'entity' => 'UFGroup',
280 'bao' => 'CRM_Core_BAO_UFGroup',
282 'serialize' => self
::SERIALIZE_COMMA
,
286 'type' => CRM_Utils_Type
::T_STRING
,
287 'title' => ts('Title'),
288 'description' => 'Form title.',
291 'size' => CRM_Utils_Type
::BIG
,
292 'table_name' => 'civicrm_uf_group',
293 'entity' => 'UFGroup',
294 'bao' => 'CRM_Core_BAO_UFGroup',
297 'frontend_title' => [
298 'name' => 'frontend_title',
299 'type' => CRM_Utils_Type
::T_STRING
,
300 'title' => ts('Frontend Title'),
301 'description' => 'Profile Form Public title',
303 'size' => CRM_Utils_Type
::BIG
,
304 'table_name' => 'civicrm_uf_group',
305 'entity' => 'UFGroup',
306 'bao' => 'CRM_Core_BAO_UFGroup',
310 'name' => 'description',
311 'type' => CRM_Utils_Type
::T_TEXT
,
312 'title' => ts('Profile Description'),
313 'description' => 'Optional verbose description of the profile.',
316 'table_name' => 'civicrm_uf_group',
317 'entity' => 'UFGroup',
318 'bao' => 'CRM_Core_BAO_UFGroup',
321 'type' => 'TextArea',
325 'name' => 'help_pre',
326 'type' => CRM_Utils_Type
::T_TEXT
,
327 'title' => ts('Help Pre'),
328 'description' => 'Description and/or help text to display before fields in form.',
331 'table_name' => 'civicrm_uf_group',
332 'entity' => 'UFGroup',
333 'bao' => 'CRM_Core_BAO_UFGroup',
336 'type' => 'TextArea',
340 'name' => 'help_post',
341 'type' => CRM_Utils_Type
::T_TEXT
,
342 'title' => ts('Profile Post Text'),
343 'description' => 'Description and/or help text to display after fields in form.',
346 'table_name' => 'civicrm_uf_group',
347 'entity' => 'UFGroup',
348 'bao' => 'CRM_Core_BAO_UFGroup',
351 'type' => 'TextArea',
354 'limit_listings_group_id' => [
355 'name' => 'limit_listings_group_id',
356 'type' => CRM_Utils_Type
::T_INT
,
357 'title' => ts('Profile Search Limit Group'),
358 'description' => 'Group id, foreign key from civicrm_group',
359 'table_name' => 'civicrm_uf_group',
360 'entity' => 'UFGroup',
361 'bao' => 'CRM_Core_BAO_UFGroup',
363 'FKClassName' => 'CRM_Contact_DAO_Group',
366 'name' => 'post_URL',
367 'type' => CRM_Utils_Type
::T_STRING
,
368 'title' => ts('Post Url'),
369 'description' => 'Redirect to URL.',
371 'size' => CRM_Utils_Type
::HUGE
,
372 'table_name' => 'civicrm_uf_group',
373 'entity' => 'UFGroup',
374 'bao' => 'CRM_Core_BAO_UFGroup',
377 'add_to_group_id' => [
378 'name' => 'add_to_group_id',
379 'type' => CRM_Utils_Type
::T_INT
,
380 'title' => ts('Add Contact To Group'),
381 'description' => 'foreign key to civicrm_group_id',
382 'table_name' => 'civicrm_uf_group',
383 'entity' => 'UFGroup',
384 'bao' => 'CRM_Core_BAO_UFGroup',
386 'FKClassName' => 'CRM_Contact_DAO_Group',
389 'name' => 'add_captcha',
390 'type' => CRM_Utils_Type
::T_BOOLEAN
,
391 'title' => ts('Show Captcha On Profile'),
392 'description' => 'Should a CAPTCHA widget be included this Profile form.',
393 'table_name' => 'civicrm_uf_group',
394 'entity' => 'UFGroup',
395 'bao' => 'CRM_Core_BAO_UFGroup',
400 'type' => CRM_Utils_Type
::T_BOOLEAN
,
401 'title' => ts('Map Profile'),
402 'description' => 'Do we want to map results from this profile.',
403 'table_name' => 'civicrm_uf_group',
404 'entity' => 'UFGroup',
405 'bao' => 'CRM_Core_BAO_UFGroup',
409 'name' => 'is_edit_link',
410 'type' => CRM_Utils_Type
::T_BOOLEAN
,
411 'title' => ts('Show Edit Link?'),
412 'description' => 'Should edit link display in profile selector',
413 'table_name' => 'civicrm_uf_group',
414 'entity' => 'UFGroup',
415 'bao' => 'CRM_Core_BAO_UFGroup',
419 'name' => 'is_uf_link',
420 'type' => CRM_Utils_Type
::T_BOOLEAN
,
421 'title' => ts('Show Link to CMS User'),
422 'description' => 'Should we display a link to the website profile in profile selector',
423 'table_name' => 'civicrm_uf_group',
424 'entity' => 'UFGroup',
425 'bao' => 'CRM_Core_BAO_UFGroup',
428 'is_update_dupe' => [
429 'name' => 'is_update_dupe',
430 'type' => CRM_Utils_Type
::T_BOOLEAN
,
431 'title' => ts('Update on Duplicate'),
432 'description' => 'Should we update the contact record if we find a duplicate',
433 'table_name' => 'civicrm_uf_group',
434 'entity' => 'UFGroup',
435 'bao' => 'CRM_Core_BAO_UFGroup',
439 'name' => 'cancel_URL',
440 'type' => CRM_Utils_Type
::T_STRING
,
441 'title' => ts('Profile Cancel URL'),
442 'description' => 'Redirect to URL when Cancle button clik .',
444 'size' => CRM_Utils_Type
::HUGE
,
445 'table_name' => 'civicrm_uf_group',
446 'entity' => 'UFGroup',
447 'bao' => 'CRM_Core_BAO_UFGroup',
451 'name' => 'is_cms_user',
452 'type' => CRM_Utils_Type
::T_BOOLEAN
,
453 'title' => ts('Create CMS User?'),
454 'description' => 'Should we create a cms user for this profile ',
455 'table_name' => 'civicrm_uf_group',
456 'entity' => 'UFGroup',
457 'bao' => 'CRM_Core_BAO_UFGroup',
462 'type' => CRM_Utils_Type
::T_TEXT
,
463 'title' => ts('Notify on Profile Submit'),
464 'table_name' => 'civicrm_uf_group',
465 'entity' => 'UFGroup',
466 'bao' => 'CRM_Core_BAO_UFGroup',
470 'name' => 'is_reserved',
471 'type' => CRM_Utils_Type
::T_BOOLEAN
,
472 'title' => ts('Profile Is Reserved'),
473 'description' => 'Is this group reserved for use by some other CiviCRM functionality?',
474 'table_name' => 'civicrm_uf_group',
475 'entity' => 'UFGroup',
476 'bao' => 'CRM_Core_BAO_UFGroup',
481 'type' => CRM_Utils_Type
::T_STRING
,
482 'title' => ts('Profile Name'),
483 'description' => 'Name of the UF group for directly addressing it in the codebase',
485 'size' => CRM_Utils_Type
::BIG
,
486 'table_name' => 'civicrm_uf_group',
487 'entity' => 'UFGroup',
488 'bao' => 'CRM_Core_BAO_UFGroup',
492 'name' => 'created_id',
493 'type' => CRM_Utils_Type
::T_INT
,
494 'title' => ts('Profile Created By'),
495 'description' => 'FK to civicrm_contact, who created this UF group',
496 'table_name' => 'civicrm_uf_group',
497 'entity' => 'UFGroup',
498 'bao' => 'CRM_Core_BAO_UFGroup',
500 'FKClassName' => 'CRM_Contact_DAO_Contact',
503 'name' => 'created_date',
504 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
505 'title' => ts('UF Group Created Date'),
506 'description' => 'Date and time this UF group was created.',
507 'table_name' => 'civicrm_uf_group',
508 'entity' => 'UFGroup',
509 'bao' => 'CRM_Core_BAO_UFGroup',
512 'is_proximity_search' => [
513 'name' => 'is_proximity_search',
514 'type' => CRM_Utils_Type
::T_BOOLEAN
,
515 'title' => ts('Include Proximity Search?'),
516 'description' => 'Should we include proximity search feature in this profile search form?',
517 'table_name' => 'civicrm_uf_group',
518 'entity' => 'UFGroup',
519 'bao' => 'CRM_Core_BAO_UFGroup',
522 'cancel_button_text' => [
523 'name' => 'cancel_button_text',
524 'type' => CRM_Utils_Type
::T_STRING
,
525 'title' => ts('Cancel Button Text'),
526 'description' => 'Custom Text to display on the Cancel button when used in create or edit mode',
528 'size' => CRM_Utils_Type
::BIG
,
530 'table_name' => 'civicrm_uf_group',
531 'entity' => 'UFGroup',
532 'bao' => 'CRM_Core_BAO_UFGroup',
535 'submit_button_text' => [
536 'name' => 'submit_button_text',
537 'type' => CRM_Utils_Type
::T_STRING
,
538 'title' => ts('Submit Button Text'),
539 'description' => 'Custom Text to display on the submit button on profile edit/create screens',
541 'size' => CRM_Utils_Type
::BIG
,
543 'table_name' => 'civicrm_uf_group',
544 'entity' => 'UFGroup',
545 'bao' => 'CRM_Core_BAO_UFGroup',
549 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
551 return Civi
::$statics[__CLASS__
]['fields'];
555 * Return a mapping from field-name to the corresponding key (as used in fields()).
558 * Array(string $name => string $uniqueName).
560 public static function &fieldKeys() {
561 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
562 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
564 return Civi
::$statics[__CLASS__
]['fieldKeys'];
568 * Returns the names of this table
572 public static function getTableName() {
573 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
577 * Returns if this table needs to be logged
581 public function getLog() {
586 * Returns the list of fields that can be imported
588 * @param bool $prefix
592 public static function &import($prefix = FALSE) {
593 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, []);
598 * Returns the list of fields that can be exported
600 * @param bool $prefix
604 public static function &export($prefix = FALSE) {
605 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, []);
610 * Returns the list of indices
612 * @param bool $localize
616 public static function indices($localize = TRUE) {
623 'localizable' => FALSE,
625 'sig' => 'civicrm_uf_group::1::name',
628 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;