3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
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-2017
31 * Generated from xml/schema/CRM/Core/UFGroup.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:d716aaa0c1ca4a43bbd533faef6d94c7)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_UFGroup constructor.
40 class CRM_Core_DAO_UFGroup
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_uf_group';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Is this form currently active? If false, hide all related fields for all sharing contexts.
66 * This column will store a comma separated list of the type(s) of profile fields.
78 * Optional verbose description of the profile.
84 * Description and/or help text to display before fields in form.
90 * Description and/or help text to display after fields in form.
96 * Group id, foreign key from civicrm_group
100 public $limit_listings_group_id;
108 * foreign key to civicrm_group_id
112 public $add_to_group_id;
114 * Should a CAPTCHA widget be included this Profile form.
120 * Do we want to map results from this profile.
126 * Should edit link display in profile selector
130 public $is_edit_link;
132 * Should we display a link to the website profile in profile selector
138 * Should we update the contact record if we find a duplicate
142 public $is_update_dupe;
144 * Redirect to URL when Cancle button clik .
150 * Should we create a cms user for this profile
161 * Is this group reserved for use by some other CiviCRM functionality?
167 * Name of the UF group for directly addressing it in the codebase
173 * FK to civicrm_contact, who created this UF group
179 * Date and time this UF group was created.
183 public $created_date;
185 * Should we include proximity search feature in this profile search form?
189 public $is_proximity_search;
193 function __construct() {
194 $this->__table
= 'civicrm_uf_group';
195 parent
::__construct();
198 * Returns foreign keys and entity references.
201 * [CRM_Core_Reference_Interface]
203 static function getReferenceColumns() {
204 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
205 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
206 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'limit_listings_group_id', 'civicrm_group', 'id');
207 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'add_to_group_id', 'civicrm_group', 'id');
208 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
209 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
211 return Civi
::$statics[__CLASS__
]['links'];
214 * Returns all the column names of this table
218 static function &fields() {
219 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
220 Civi
::$statics[__CLASS__
]['fields'] = array(
223 'type' => CRM_Utils_Type
::T_INT
,
224 'title' => ts('Profile ID') ,
225 'description' => 'Unique table ID',
227 'table_name' => 'civicrm_uf_group',
228 'entity' => 'UFGroup',
229 'bao' => 'CRM_Core_BAO_UFGroup',
232 'is_active' => array(
233 'name' => 'is_active',
234 'type' => CRM_Utils_Type
::T_BOOLEAN
,
235 'title' => ts('Profile Is Active') ,
236 'description' => 'Is this form currently active? If false, hide all related fields for all sharing contexts.',
238 'table_name' => 'civicrm_uf_group',
239 'entity' => 'UFGroup',
240 'bao' => 'CRM_Core_BAO_UFGroup',
243 'group_type' => array(
244 'name' => 'group_type',
245 'type' => CRM_Utils_Type
::T_STRING
,
246 'title' => ts('Profile Group Type') ,
247 'description' => 'This column will store a comma separated list of the type(s) of profile fields.',
249 'size' => CRM_Utils_Type
::HUGE
,
251 'where' => 'civicrm_uf_group.group_type',
252 'headerPattern' => '',
255 'table_name' => 'civicrm_uf_group',
256 'entity' => 'UFGroup',
257 'bao' => 'CRM_Core_BAO_UFGroup',
262 'type' => CRM_Utils_Type
::T_STRING
,
263 'title' => ts('Title') ,
264 'description' => 'Form title.',
267 'size' => CRM_Utils_Type
::BIG
,
268 'table_name' => 'civicrm_uf_group',
269 'entity' => 'UFGroup',
270 'bao' => 'CRM_Core_BAO_UFGroup',
273 'description' => array(
274 'name' => 'description',
275 'type' => CRM_Utils_Type
::T_TEXT
,
276 'title' => ts('Profile Description') ,
277 'description' => 'Optional verbose description of the profile.',
280 'table_name' => 'civicrm_uf_group',
281 'entity' => 'UFGroup',
282 'bao' => 'CRM_Core_BAO_UFGroup',
285 'type' => 'TextArea',
289 'name' => 'help_pre',
290 'type' => CRM_Utils_Type
::T_TEXT
,
291 'title' => ts('Help Pre') ,
292 'description' => 'Description and/or help text to display before fields in form.',
295 'table_name' => 'civicrm_uf_group',
296 'entity' => 'UFGroup',
297 'bao' => 'CRM_Core_BAO_UFGroup',
300 'type' => 'TextArea',
303 'help_post' => array(
304 'name' => 'help_post',
305 'type' => CRM_Utils_Type
::T_TEXT
,
306 'title' => ts('Profile Post Text') ,
307 'description' => 'Description and/or help text to display after fields in form.',
310 'table_name' => 'civicrm_uf_group',
311 'entity' => 'UFGroup',
312 'bao' => 'CRM_Core_BAO_UFGroup',
315 'type' => 'TextArea',
318 'limit_listings_group_id' => array(
319 'name' => 'limit_listings_group_id',
320 'type' => CRM_Utils_Type
::T_INT
,
321 'title' => ts('Profile Search Limit Group') ,
322 'description' => 'Group id, foreign key from civicrm_group',
323 'table_name' => 'civicrm_uf_group',
324 'entity' => 'UFGroup',
325 'bao' => 'CRM_Core_BAO_UFGroup',
327 'FKClassName' => 'CRM_Contact_DAO_Group',
330 'name' => 'post_URL',
331 'type' => CRM_Utils_Type
::T_STRING
,
332 'title' => ts('Post Url') ,
333 'description' => 'Redirect to URL.',
335 'size' => CRM_Utils_Type
::HUGE
,
336 'table_name' => 'civicrm_uf_group',
337 'entity' => 'UFGroup',
338 'bao' => 'CRM_Core_BAO_UFGroup',
341 'add_to_group_id' => array(
342 'name' => 'add_to_group_id',
343 'type' => CRM_Utils_Type
::T_INT
,
344 'title' => ts('Add Contact To Group') ,
345 'description' => 'foreign key to civicrm_group_id',
346 'table_name' => 'civicrm_uf_group',
347 'entity' => 'UFGroup',
348 'bao' => 'CRM_Core_BAO_UFGroup',
350 'FKClassName' => 'CRM_Contact_DAO_Group',
352 'add_captcha' => array(
353 'name' => 'add_captcha',
354 'type' => CRM_Utils_Type
::T_BOOLEAN
,
355 'title' => ts('Show Captcha On Profile') ,
356 'description' => 'Should a CAPTCHA widget be included this Profile form.',
357 'table_name' => 'civicrm_uf_group',
358 'entity' => 'UFGroup',
359 'bao' => 'CRM_Core_BAO_UFGroup',
364 'type' => CRM_Utils_Type
::T_BOOLEAN
,
365 'title' => ts('Map Profile') ,
366 'description' => 'Do we want to map results from this profile.',
367 'table_name' => 'civicrm_uf_group',
368 'entity' => 'UFGroup',
369 'bao' => 'CRM_Core_BAO_UFGroup',
372 'is_edit_link' => array(
373 'name' => 'is_edit_link',
374 'type' => CRM_Utils_Type
::T_BOOLEAN
,
375 'title' => ts('Show Edit Link?') ,
376 'description' => 'Should edit link display in profile selector',
377 'table_name' => 'civicrm_uf_group',
378 'entity' => 'UFGroup',
379 'bao' => 'CRM_Core_BAO_UFGroup',
382 'is_uf_link' => array(
383 'name' => 'is_uf_link',
384 'type' => CRM_Utils_Type
::T_BOOLEAN
,
385 'title' => ts('Show Link to CMS User') ,
386 'description' => 'Should we display a link to the website profile in profile selector',
387 'table_name' => 'civicrm_uf_group',
388 'entity' => 'UFGroup',
389 'bao' => 'CRM_Core_BAO_UFGroup',
392 'is_update_dupe' => array(
393 'name' => 'is_update_dupe',
394 'type' => CRM_Utils_Type
::T_BOOLEAN
,
395 'title' => ts('Update on Duplicate') ,
396 'description' => 'Should we update the contact record if we find a duplicate',
397 'table_name' => 'civicrm_uf_group',
398 'entity' => 'UFGroup',
399 'bao' => 'CRM_Core_BAO_UFGroup',
402 'cancel_URL' => array(
403 'name' => 'cancel_URL',
404 'type' => CRM_Utils_Type
::T_STRING
,
405 'title' => ts('Profile Cancel URL') ,
406 'description' => 'Redirect to URL when Cancle button clik .',
408 'size' => CRM_Utils_Type
::HUGE
,
409 'table_name' => 'civicrm_uf_group',
410 'entity' => 'UFGroup',
411 'bao' => 'CRM_Core_BAO_UFGroup',
414 'is_cms_user' => array(
415 'name' => 'is_cms_user',
416 'type' => CRM_Utils_Type
::T_BOOLEAN
,
417 'title' => ts('Create CMS User?') ,
418 'description' => 'Should we create a cms user for this profile ',
419 'table_name' => 'civicrm_uf_group',
420 'entity' => 'UFGroup',
421 'bao' => 'CRM_Core_BAO_UFGroup',
426 'type' => CRM_Utils_Type
::T_TEXT
,
427 'title' => ts('Notify on Profile Submit') ,
428 'table_name' => 'civicrm_uf_group',
429 'entity' => 'UFGroup',
430 'bao' => 'CRM_Core_BAO_UFGroup',
433 'is_reserved' => array(
434 'name' => 'is_reserved',
435 'type' => CRM_Utils_Type
::T_BOOLEAN
,
436 'title' => ts('Profile Is Reserved') ,
437 'description' => 'Is this group reserved for use by some other CiviCRM functionality?',
438 'table_name' => 'civicrm_uf_group',
439 'entity' => 'UFGroup',
440 'bao' => 'CRM_Core_BAO_UFGroup',
445 'type' => CRM_Utils_Type
::T_STRING
,
446 'title' => ts('Profile Name') ,
447 'description' => 'Name of the UF group for directly addressing it in the codebase',
449 'size' => CRM_Utils_Type
::BIG
,
450 'table_name' => 'civicrm_uf_group',
451 'entity' => 'UFGroup',
452 'bao' => 'CRM_Core_BAO_UFGroup',
455 'created_id' => array(
456 'name' => 'created_id',
457 'type' => CRM_Utils_Type
::T_INT
,
458 'title' => ts('Profile Created By') ,
459 'description' => 'FK to civicrm_contact, who created this UF group',
460 'table_name' => 'civicrm_uf_group',
461 'entity' => 'UFGroup',
462 'bao' => 'CRM_Core_BAO_UFGroup',
464 'FKClassName' => 'CRM_Contact_DAO_Contact',
466 'created_date' => array(
467 'name' => 'created_date',
468 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
469 'title' => ts('UF Group Created Date') ,
470 'description' => 'Date and time this UF group was created.',
471 'table_name' => 'civicrm_uf_group',
472 'entity' => 'UFGroup',
473 'bao' => 'CRM_Core_BAO_UFGroup',
476 'is_proximity_search' => array(
477 'name' => 'is_proximity_search',
478 'type' => CRM_Utils_Type
::T_BOOLEAN
,
479 'title' => ts('Include Proximity Search?') ,
480 'description' => 'Should we include proximity search feature in this profile search form?',
481 'table_name' => 'civicrm_uf_group',
482 'entity' => 'UFGroup',
483 'bao' => 'CRM_Core_BAO_UFGroup',
487 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
489 return Civi
::$statics[__CLASS__
]['fields'];
492 * Return a mapping from field-name to the corresponding key (as used in fields()).
495 * Array(string $name => string $uniqueName).
497 static function &fieldKeys() {
498 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
499 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
501 return Civi
::$statics[__CLASS__
]['fieldKeys'];
504 * Returns the names of this table
508 static function getTableName() {
509 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
512 * Returns if this table needs to be logged
520 * Returns the list of fields that can be imported
522 * @param bool $prefix
526 static function &import($prefix = false) {
527 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, array());
531 * Returns the list of fields that can be exported
533 * @param bool $prefix
537 static function &export($prefix = false) {
538 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, array());
542 * Returns the list of indices
544 public static function indices($localize = TRUE) {
551 'localizable' => false,
553 'sig' => 'civicrm_uf_group::1::name',
556 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;