3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2016
31 * Generated from xml/schema/CRM/Core/UFGroup.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:0428de652198e17e9b651a08e38f9cc4)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_UFGroup
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_uf_group';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
90 * Is this form currently active? If false, hide all related fields for all sharing contexts.
96 * This column will store a comma separated list of the type(s) of profile fields.
108 * Optional verbose description of the profile.
114 * Description and/or help text to display before fields in form.
120 * Description and/or help text to display after fields in form.
126 * Group id, foreign key from civicrm_group
130 public $limit_listings_group_id;
138 * foreign key to civicrm_group_id
142 public $add_to_group_id;
144 * Should a CAPTCHA widget be included this Profile form.
150 * Do we want to map results from this profile.
156 * Should edit link display in profile selector
160 public $is_edit_link;
162 * Should we display a link to the website profile in profile selector
168 * Should we update the contact record if we find a duplicate
172 public $is_update_dupe;
174 * Redirect to URL when Cancle button clik .
180 * Should we create a cms user for this profile
191 * Is this group reserved for use by some other CiviCRM functionality?
197 * Name of the UF group for directly addressing it in the codebase
203 * FK to civicrm_contact, who created this UF group
209 * Date and time this UF group was created.
213 public $created_date;
215 * Should we include proximity search feature in this profile search form?
219 public $is_proximity_search;
223 * @return civicrm_uf_group
225 function __construct() {
226 $this->__table
= 'civicrm_uf_group';
227 parent
::__construct();
230 * Returns foreign keys and entity references
233 * [CRM_Core_Reference_Interface]
235 static function getReferenceColumns() {
236 if (!self
::$_links) {
237 self
::$_links = static ::createReferenceColumns(__CLASS__
);
238 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'limit_listings_group_id', 'civicrm_group', 'id');
239 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'add_to_group_id', 'civicrm_group', 'id');
240 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
242 return self
::$_links;
245 * Returns all the column names of this table
249 static function &fields() {
250 if (!(self
::$_fields)) {
251 self
::$_fields = array(
254 'type' => CRM_Utils_Type
::T_INT
,
255 'title' => ts('Profile ID') ,
256 'description' => 'Unique table ID',
259 'is_active' => array(
260 'name' => 'is_active',
261 'type' => CRM_Utils_Type
::T_BOOLEAN
,
262 'title' => ts('Profile Is Active') ,
263 'description' => 'Is this form currently active? If false, hide all related fields for all sharing contexts.',
266 'group_type' => array(
267 'name' => 'group_type',
268 'type' => CRM_Utils_Type
::T_STRING
,
269 'title' => ts('Profile Group Type') ,
270 'description' => 'This column will store a 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' => '',
281 'type' => CRM_Utils_Type
::T_STRING
,
282 'title' => ts('Title') ,
283 'description' => 'Form title.',
286 'size' => CRM_Utils_Type
::BIG
,
288 'description' => array(
289 'name' => 'description',
290 'type' => CRM_Utils_Type
::T_TEXT
,
291 'title' => ts('Profile Description') ,
292 'description' => 'Optional verbose description of the profile.',
296 'type' => 'TextArea',
300 'name' => 'help_pre',
301 'type' => CRM_Utils_Type
::T_TEXT
,
302 'title' => ts('Help Pre') ,
303 'description' => 'Description and/or help text to display before fields in form.',
307 'type' => 'TextArea',
310 'help_post' => array(
311 'name' => 'help_post',
312 'type' => CRM_Utils_Type
::T_TEXT
,
313 'title' => ts('Profile Post Text') ,
314 'description' => 'Description and/or help text to display after fields in form.',
318 'type' => 'TextArea',
321 'limit_listings_group_id' => array(
322 'name' => 'limit_listings_group_id',
323 'type' => CRM_Utils_Type
::T_INT
,
324 'title' => ts('Profile Search Limit Group') ,
325 'description' => 'Group id, foreign key from civicrm_group',
326 'FKClassName' => 'CRM_Contact_DAO_Group',
329 'name' => 'post_URL',
330 'type' => CRM_Utils_Type
::T_STRING
,
331 'title' => ts('Post Url') ,
332 'description' => 'Redirect to URL.',
334 'size' => CRM_Utils_Type
::HUGE
,
336 'add_to_group_id' => array(
337 'name' => 'add_to_group_id',
338 'type' => CRM_Utils_Type
::T_INT
,
339 'title' => ts('Add Contact To Group') ,
340 'description' => 'foreign key to civicrm_group_id',
341 'FKClassName' => 'CRM_Contact_DAO_Group',
343 'add_captcha' => array(
344 'name' => 'add_captcha',
345 'type' => CRM_Utils_Type
::T_BOOLEAN
,
346 'title' => ts('Show Captcha On Profile') ,
347 'description' => 'Should a CAPTCHA widget be included this Profile form.',
351 'type' => CRM_Utils_Type
::T_BOOLEAN
,
352 'title' => ts('Map Profile') ,
353 'description' => 'Do we want to map results from this profile.',
355 'is_edit_link' => array(
356 'name' => 'is_edit_link',
357 'type' => CRM_Utils_Type
::T_BOOLEAN
,
358 'title' => ts('Show Edit Link?') ,
359 'description' => 'Should edit link display in profile selector',
361 'is_uf_link' => array(
362 'name' => 'is_uf_link',
363 'type' => CRM_Utils_Type
::T_BOOLEAN
,
364 'title' => ts('Show Link to CMS User') ,
365 'description' => 'Should we display a link to the website profile in profile selector',
367 'is_update_dupe' => array(
368 'name' => 'is_update_dupe',
369 'type' => CRM_Utils_Type
::T_BOOLEAN
,
370 'title' => ts('Update on Duplicate') ,
371 'description' => 'Should we update the contact record if we find a duplicate',
373 'cancel_URL' => array(
374 'name' => 'cancel_URL',
375 'type' => CRM_Utils_Type
::T_STRING
,
376 'title' => ts('Profile Cancel URL') ,
377 'description' => 'Redirect to URL when Cancle button clik .',
379 'size' => CRM_Utils_Type
::HUGE
,
381 'is_cms_user' => array(
382 'name' => 'is_cms_user',
383 'type' => CRM_Utils_Type
::T_BOOLEAN
,
384 'title' => ts('Create CMS User?') ,
385 'description' => 'Should we create a cms user for this profile ',
389 'type' => CRM_Utils_Type
::T_TEXT
,
390 'title' => ts('Notify on Profile Submit') ,
392 'is_reserved' => array(
393 'name' => 'is_reserved',
394 'type' => CRM_Utils_Type
::T_BOOLEAN
,
395 'title' => ts('Profile Is Reserved') ,
396 'description' => 'Is this group reserved for use by some other CiviCRM functionality?',
400 'type' => CRM_Utils_Type
::T_STRING
,
401 'title' => ts('Profile Name') ,
402 'description' => 'Name of the UF group for directly addressing it in the codebase',
404 'size' => CRM_Utils_Type
::BIG
,
406 'created_id' => array(
407 'name' => 'created_id',
408 'type' => CRM_Utils_Type
::T_INT
,
409 'title' => ts('Profile Created By') ,
410 'description' => 'FK to civicrm_contact, who created this UF group',
411 'FKClassName' => 'CRM_Contact_DAO_Contact',
413 'created_date' => array(
414 'name' => 'created_date',
415 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
416 'title' => ts('UF Group Created Date') ,
417 'description' => 'Date and time this UF group was created.',
419 'is_proximity_search' => array(
420 'name' => 'is_proximity_search',
421 'type' => CRM_Utils_Type
::T_BOOLEAN
,
422 'title' => ts('Include Proximity Search?') ,
423 'description' => 'Should we include proximity search feature in this profile search form?',
427 return self
::$_fields;
430 * Returns an array containing, for each field, the arary key used for that
431 * field in self::$_fields.
435 static function &fieldKeys() {
436 if (!(self
::$_fieldKeys)) {
437 self
::$_fieldKeys = array(
439 'is_active' => 'is_active',
440 'group_type' => 'group_type',
442 'description' => 'description',
443 'help_pre' => 'help_pre',
444 'help_post' => 'help_post',
445 'limit_listings_group_id' => 'limit_listings_group_id',
446 'post_URL' => 'post_URL',
447 'add_to_group_id' => 'add_to_group_id',
448 'add_captcha' => 'add_captcha',
449 'is_map' => 'is_map',
450 'is_edit_link' => 'is_edit_link',
451 'is_uf_link' => 'is_uf_link',
452 'is_update_dupe' => 'is_update_dupe',
453 'cancel_URL' => 'cancel_URL',
454 'is_cms_user' => 'is_cms_user',
455 'notify' => 'notify',
456 'is_reserved' => 'is_reserved',
458 'created_id' => 'created_id',
459 'created_date' => 'created_date',
460 'is_proximity_search' => 'is_proximity_search',
463 return self
::$_fieldKeys;
466 * Returns the names of this table
470 static function getTableName() {
471 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
474 * Returns if this table needs to be logged
482 * Returns the list of fields that can be imported
484 * @param bool $prefix
488 static function &import($prefix = false) {
489 if (!(self
::$_import)) {
490 self
::$_import = array();
491 $fields = self
::fields();
492 foreach($fields as $name => $field) {
493 if (CRM_Utils_Array
::value('import', $field)) {
495 self
::$_import['uf_group'] = & $fields[$name];
497 self
::$_import[$name] = & $fields[$name];
502 return self
::$_import;
505 * Returns the list of fields that can be exported
507 * @param bool $prefix
511 static function &export($prefix = false) {
512 if (!(self
::$_export)) {
513 self
::$_export = array();
514 $fields = self
::fields();
515 foreach($fields as $name => $field) {
516 if (CRM_Utils_Array
::value('export', $field)) {
518 self
::$_export['uf_group'] = & $fields[$name];
520 self
::$_export[$name] = & $fields[$name];
525 return self
::$_export;